httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Hendry <>
Subject [users@httpd] Optimizing Virtual host(s) configuration on apache 1.3.31
Date Thu, 15 Jul 2004 13:52:14 GMT
Can I configure apache to automagically look in
/web/ for a vhost on the ip of my server?

For example. On a client machine I can:
sudo echo >> /etc/hosts

And when putting in in my browser, I would get a 404. :)
Unless I mkdir /etc/ on my server.

Right now my configuration is real pain in the ass[1].

In my monstrous httpd.conf, I have somewhere my vhosts listed like so:


    Include conf/                                                         


What is the point of NameVirtualHost? I still have to put in the IP, as
thanks to:

I have since learnt to put in the ip address and use ServerName to
avoid errors like:
error.log:[Thu Jul 15 00:32:37 2004] [error] Cannot resolve host name ---


    Include conf/                                                  

All my sites are pretty much the same. I override any settings with .htaccess.
So my configurations in /etc/apache/conf duplicate each other:

bilbo$ diff -u 
---      2004-07-15 16:00:17.000000000 +0300
+++      2004-07-15 00:38:55.000000000 +0300
@@ -1,10 +1,10 @@
-  CustomLog /var/log/apache/ combined
-  ServerAdmin
-  ServerName
+  CustomLog /var/log/apache/ combined
+  ServerAdmin
+  ServerName
-DocumentRoot /web/
+DocumentRoot /web/
-  <Directory "/web/">
+  <Directory "/web/">
     Options All
     AllowOverride All
     Order allow,deny

So ideally I would not have to edit httpd.conf, make a new configuration
file and restart apache everytime I start a new web project.  I also
forgot to update httpd.conf when my machine switched to another IP. That
was another painful exp I would like to avoid.


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