Apache Virtualhost
How can we set up a Virtual Host?
Create a vhost.conf file:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/usr/local/apache2/docs/thegeekstuff"
ServerName thegeekstuff.com
ServerAlias www.thegeekstuff.com
ErrorLog "logs/thegeekstuff/error_log"
CustomLog "logs/thegeekstuff/access_log" common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/usr/local/apache2/docs/top5freeware"
ServerName top5freeware.com
ServerAlias www.top5freeware.com
ErrorLog "logs/top5freeware/error_log"
CustomLog "logs/top5freeware/access_log" common
</VirtualHost>
How can we dynamically configured mass virtual hosting?
If you are following instruction from http://httpd.apache.org/docs/2.0/vhosts/mass.html to set up name-based virtual hosts, you must use the LogFormat directives mentioned. Not sure why, but haven't got time to verify.
page revision: 3, last edited: 15 Aug 2016 21:33