[ydl-gen] Apache web server & virtual hosts
Eric Dunbar
eric.dunbar at gmail.com
Tue Jul 25 20:51:07 MDT 2006
On 25/07/06, Michael Baer <ydl at mikesoffice.com> wrote:
> >>>>> 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>
Well, changing the LISTEN directive did make a change but I couldn't
figure out what it was using as its DocumentRoot ... and I didn't have
the time or inclination to find out what to do since...
The :80 tricked worked like a charm. Thank you very much. All I did
was change the port number on my virtualhost definition to :80 and it
worked :-) :-) :-).
Thanks once again to both Ray & Michael for helping out.
Eric.
More information about the yellowdog-general
mailing list