Hi guys,
I am setting up Apache to work with Tomcat.
Anyway, on apache end, when I configure NameVirtualHost, it doesn't work!
The original settings:
Code:
NameVirtualHost *:80
<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>
But no matter what, it always searches for documents at /var/www/html which is define as documentroot earlier in httpd.conf. I even commented that out for it to work.
I had to make it as such before it works:
Code:
NameVirtualHost 192.168.1.10:80
<VirtualHost 192.168.1.10: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>
Basically I need to add the IP address before it will work.
While I never had this problem with apache before, it is the first time I am using Centos for this purpose...
and when i restart apache with the new settings it prompted a warning:
Quote:
Starting httpd: [Fri Apr 06 15:30:42 2007] [error] VirtualHost www.domain.com:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Fri Apr 06 15:30:42 2007] [error] VirtualHost www.domain1.com:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
|
any suggestion why is it working this way?
Thanks!