Hello all,
I've been trying to get my vhosts working for
different sites/ports here is the config I've tried
and from what Apache.org says...it would seem that it
should work but it isn't.
Hosts file has (I'll add to dns later)
10.0.1.1 www.test.com
10.0.1.1 www.test2.com
and the listen.conf as:
NameVirtualHost 10.0.1.1:80
NameVirtualHost 10.0.1.1:81
ServerName www.test.com
DocumentRoot /srv/www/htdocs/
</VirtualHost>
ServerName www.test2.com
DocumentRoot /srv/www/htdocs/site2/
</VirtualHost>
Listen 81
Listen 80
I can get to the main page fine but when I type in
www.test2.com I get the same page. If I specify :81
then yes I get the correct page. Isn't there a way to
configure the server that when I type in www.test2.com
it will read the apache config files and redirect it
to the correct port 81.
Thanks for the help.
----------------------------------------------
Note: I can use the following and get it to work
great.
I just would like to undertand how to use different
ports correctly
NameVirtualHost *
ServerName www.test.com
DocumentRoot /srv/www/htdocs/
</VirtualHost>
ServerName www.test2.com
DocumentRoot /srv/www/htdocs/site2/
</VirtualHost>
Listen 80
--------------------------------------------------
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html