RESOLVED [gentoo-user] Apache vhosts revisited
It turns out that this (and probably the OPs problem as well) isnt related to Apache at all, but a networking issue. As long as the /etc/hosts files match on both machines, all is well It also turns out that, even though deprecated in the RFCs, an underscore is not legal in a virtual host name. Thanks to sub on the IRC channels for the input! John D -Original Message- From: John Dangler [mailto:[EMAIL PROTECTED] Sent: Monday, September 05, 2005 12:05 PM To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] Apache vhosts revisited Importance: High After going back through the entire thread dealing with the vhosts problem that was running here recently, I tried to setup my local fileserver with the default apache server, and adding 1 virtual host. my apache2.conf file is basically a default (out of the box) setup, with the line Include conf/vhosts/vhsots.conf uncommented so that it is included. my vhosts.conf file has NameVirtualHost 192.168.1.36:80 VirtualHost 192.168.1.36:80 ServerName Mambo DocumentRoot /var/www/localhost/htdocs /VirtualHost VirtualHost 192.168.1.36:80 ServerName GenoFit DocumentRoot /usr2/genofit/public Driectory /usr2/genofit/public order deny,allow Allow from all AllowOverride All Options FollowSymLinks /Directory /VirtualHost from the local machine, both hosts are accessible. from another machine on the same router (192.168.1.35): browsing to 192.168.1.36 gives me the Apache default page. browsing to 192.168.1.36/GenoFit gives me Not Found The requested URL /GenoFit was not found on the server browsing to 192.168.1.36/Mambo gives me Not Found The requested URL /Mambo was not found on the server ping works in both directions, so Im sure that its something I did/didnt do correctly in the config files. After reading through the wiki docs on virtual hosts, and the docs on the apache site (which are a little harder to digest), I think that the vhosts file is ok, but Im not sure about the apache2.conf file Any input is appreciated. John D -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Apache vhosts revisited
John Dangler wrote: After going back through the entire thread dealing with the vhosts problem that was running here recently, I tried to setup my local fileserver with the ‘default’ apache server, and adding 1 virtual host. my apache2.conf file is basically a default (out of the box) setup, with the line Include conf/vhosts/vhsots.conf uncommented so that it is included. my vhosts.conf file has NameVirtualHost 192.168.1.36:80 VirtualHost 192.168.1.36:80 ServerName Mambo DocumentRoot /var/www/localhost/htdocs /VirtualHost VirtualHost 192.168.1.36:80 ServerName GenoFit DocumentRoot /usr2/genofit/public Driectory /usr2/genofit/public order deny,allow Allow from all AllowOverride All Options FollowSymLinks /Directory /VirtualHost from the local machine, both hosts are accessible. from another machine on the same router (192.168.1.35): browsing to 192.168.1.36 gives me the Apache default page. browsing to 192.168.1.36/GenoFit gives me “Not Found” The requested URL /GenoFit was not found on the server browsing to 192.168.1.36/Mambo gives me “Not Found” The requested URL /Mambo was not found on the server ping works in both directions, so I’m sure that it’s something I did/didn’t do correctly in the config files. After reading through the wiki docs on virtual hosts, and the docs on the apache site (which are a little harder to digest), I think that the vhosts file is ok, but I’m not sure about the apache2.conf file… Any input is appreciated. John D I don't see much into this, but will it not be in confict if you use the same IP and port for 2 ServerNames? I would use different ports for these two webs instead. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Apache vhosts revisited
On Mon, 05 Sep 2005 22:17:15 +0200, q-parser wrote: I don't see much into this, but will it not be in confict if you use the same IP and port for 2 ServerNames? No, this is how name based virtual hosting works. The browser sends a host: header with the request, Apache uses this to determine which virtual host to use to serve the content. It is possible to serve thousands of hosts from a single port and IP address. See the commented vhost config files and the documentation for a more complete explanation. I would use different ports for these two webs instead. That would require visitors to type a port number as well as the URI, something most web users are not accustomed to. -- Neil Bothwick Are you using Windows or is that just an XT? pgpoGE7M8Q8QG.pgp Description: PGP signature