kingpabel blog apache virtual host

Apache Virtual Host Example

Apache is a server which can run php file.Normally in apache we run php project or file as localhost.But we can run a project using only the project name or link a domain name,for that we need to create apache virtual host.Lets see how to create an apache virtual host example.For that at first we need to this go directory and open a file

etc/apache2/sites-available/000-default.conf

After open put those below line in that file.

Apache virtual host

Then open /etc/hosts file and set ip for your new created apache virtual host

127.0.0.1       yourHostName

After done run apache2 restart.
If you follow my code you can set access log and error log for only that virtual hsot.So use apache virtual host and enjoy!!!!!!