[ydl-gen] Apache web server & virtual hosts

Michael Baer ydl at mikesoffice.com
Tue Jul 25 15:44:34 MDT 2006


>>>>> On Mon, 24 Jul 2006 18:30:15 -0400, "Eric Dunbar" <eric.dunbar at gmail.com> said:

    Eric> Hi all, I have been trying to set up virtual hosts on my
    Eric> webserver (so I can do foo.bar.com, big.bar.com,
    Eric> etc.bar.com).

    Eric> I managed to set one up successfully using the webmin
    Eric> interface for port 6900. I tried to add a second virtual
    Eric> host on a different port but it wouldn't be recognised.

    Eric> HOWEVER, if I swap the port numbers on the virtual hosts
    Eric> the one I added second will appear on port 6900 but the
    Eric> one I originally entered on 6900 is then disabled.

    Eric> This is what the virtual host entry looks like...

Hi Eric,

Well, I'm not a web guru and I've never used webmin, so take my
suggestions with a grain of salt handy.  (and you might want to try
the Apache mailing list) But some things come to mind.
I think you may need to add some NameVirtualHost lines in your
httpd.conf file, e.g.

NameVirtualHost 10.0.0.1:80
NameVirtualHost 10.0.0.1:6900
NameVirtualHost 10.0.0.1:99

You also may need to mess with the 'Listen' config.  I'm also not
sure why you're doing separate ports.  You can have all of your
address go to port 80 if you want:

<VirtualHost 10.0.0.1:80 >
   DocumentRoot /home/httpd/html/foo
   ServerName foo.bar.com
</VirtualHost>

<VirtualHost 10.0.0.1:80 >
   DocumentRoot /home/httpd/html/big
   ServerName big.bar.com
</VirtualHost>

but if you really want separate ports, I think with the
NameVirtualhost lines above you could do the following as well:

<VirtualHost 10.0.0.1:6900 >
   DocumentRoot /home/httpd/html/big
   ServerName big.bar.com
</VirtualHost>


-Mike


-- 
ydl at mikesoffice.com



More information about the yellowdog-general mailing list