httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fortin, John {PBG}" <John.For...@pepsi.com>
Subject RE: [users@httpd] Virtual Hosting Woes.......
Date Sat, 20 Sep 2003 18:12:31 GMT
I believe that since the IP addresses for your domains are the same, you
need to use the hostname to differentiate between the sites like this:

<VirtualHost www.Dom1.com:80>
ServerName www.Dom1.com
DocumentRoot /var/local/www/data/Dom1
ErrorLog /var/log/Dom1-error_log
CustomLog /var/log/Dom1-access_log common
</VirtualHost>

<VirtualHost www.Dom2.com:80>
ServerName www.Dom2.com
DocumentRoot /var/local/www/data/Dom2
ErrorLog /var/log/Dom2-error_log
CustomLog /var/log/Dom2-access_log common
</VirtualHost>

Good luck...

--john 

-----Original Message-----
From: Mandrich [mailto:mandrich@4fts.com]
Sent: Friday, September 19, 2003 11:48 AM
To: users@httpd.apache.org
Subject: [users@httpd] Virtual Hosting Woes.......


Hi All,

I'm having some difficulty getting my virtual hosting to work. Apache starts
fine and shows no errors. All domains have entries on my local name server
that point to the one IP for the machine. Any of the domains I've created
route to the box, but I only get the default directory and not the assigned
directory regardless of which site I request. Nothing shows up in the logs
specified under the virtual hosting directive, and the http access log just
shows a regular served request for the domain I requested. I've done my best
to read through the apache online docs, but it rally seems pretty straight
forward. I must be overlooking something really simple. Any thoughts or
suggestions? Are there directives that I should comment out form the 'main'
server section? Below is my Virtual hosting section:

NameVirtualHost 192.168.0.200:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

<VirtualHost 192.168.0.200:80>
ServerName www.Dom1.com
DocumentRoot /var/local/www/data/Dom1
ErrorLog /var/log/Dom1-error_log
CustomLog /var/log/Dom1-access_log common
</VirtualHost>

<VirtualHost 192.168.0.200:80>
ServerName www.Dom2.com
DocumentRoot /var/local/www/data/Dom2
ErrorLog /var/log/Dom2-error_log
CustomLog /var/log/Dom2-access_log common
</VirtualHost>


Thank you in advance for any help!

Mark


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

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