httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donna Robinson <>
Subject Re: [users@httpd] Virtual Hosting Help Newbie
Date Mon, 23 Jun 2003 02:59:32 GMT
Hi Casey,

For what it's worth, here's the relevant contents of my Idiots Guide - I wrote 
it all down as I only need to do with every other year, but which time I've 
forgotten everything.
Best of luck,

 Customize the Apache HTTP server by editing the config file 
Ignore these:

In /etc/httpd/conf/httpd.conf:
ServerName phoenix
DocumentRoot "/home/de/WebPages"
<Directory "/home/de/WebPages">

If using .htaccess files, set this 
(it's just below the <Directory .. lines)
AllowOverride All

Since I can never remember where the log file is kept, do this
cd /tmp
ln -s /var/log/httpd/error_log apache_errors.log

2. Virtual Hosting:

1. Look for this line in /etc/httpd/httpd.conf:
   Uncomment this:
#NameVirtualHost *

2. First we need to create a <VirtualHost> block for the existing
   host.  The ServerName and DocumentRoot here should be the
   *same* as the global ServerName and DocumentRoot.  List this
   one first so it acts as the default.  

   Supposing you have the foll. in the 'Main' server configuration
ServerName phoenix
DocumentRoot "/home/de/WebPages"

  Then you need to do this:
<VirtualHost *>
 ServerName phoenix
 DocumentRoot /home/de/WebPages/

3. Now we need to create a <VirtualHost> block for each different
   host that we want to serve:
<VirtualHost *>
 DocumentRoot /home/de/WebPages/OpenWorks/

  You can just keep on adding these in till the cows come home.

4. Last but not least, you must make entries in /etc/hosts to
   associate the domain with the local IP.  Note: these entries are 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message