[thelist] Local apache

Jeroen Coumans jeroen at jeroencoumans.nl
Tue Jan 27 18:14:55 CST 2004

Thanks J.J.SOLARI! I'm now using the VirtualHost directive under
Apache-1.3 on Linux. Here's a summary:

You can test websites locally under Apache by using the VirtualHosts
directive. For each site you wish to test, use a seperate directory, eg.
/www/local.site.com. Now add the following lines to your httpd.conf:


DocumentRoot /www/

Now for each site you wish to test, add a VirtualHost directive. You can
use the following as a template:

<VirtualHost local.site.com>
DocumentRoot /var/www/local.site.com
ServerName local.site.com

Reload Apache. To make the site accessible from your browser as
http://local.site.com, add the following line to /etc/hosts: local.site.com

You'll have to add a line such as that for each site, changing the
hostname as appropriate, but leaving the IP address alone.

Jeroen Coumans

More information about the thelist mailing list