httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donna Robinson <do...@terpsichore.ws>
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,
Donna

 Customize the Apache HTTP server by editing the config file 
  /etc/httpd/conf/httpd.conf
Ignore these:
  /etc/httpd/conf/access.conf
  /etc/httpd/conf/srm.conf

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/
</VirtualHost>


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

  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 
tab-separated.
192.168.0.1     open-works.co.uk        open-works.co.uk





















---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message