11-17-05 11:10 PM
In migrating our server to a new one with Apache 2.0.52.
And I'm getting various errors from my "/etc/rc.d/ini.d/httpd
configtest" depending on what I try from the O'Reilly "Apache
Definitive Guide" and similar suggestions found on the newsgroup for
similar problems.
Here's the top of my virtualdir that I have included at the end of my
httpd.conf:
NameVirtualHost (our IP)
<VirtualHost (our IP):80>
DocumentRoot /var/www/html/home/pa
ServerName (our domain).com
ServerAlias www.(our domain).com
TransferLog /var/www/html/home/logs/access_log
ErrorLog /var/www/html/home/logs/error_log
</VirtualHost>
<IfDefine HAVE_SSL>
<VirtualHost (our IP):443>
DocumentRoot /var/www/html/home/pa
ServerName (our domain).com
ServerAlias www.(our domain).com
TransferLog /var/www/html/home/pa/logs/access_log
ErrorLog /var/www/html/home/pa/logs/error_log
SSLEngine on
SSLCertificateFile /etc/httpd/conf.d/ssl.crt/(our domain).com.crt
SSLCertificateKeyFile /etc/httpd/conf.d/ssl.key/(our domain).com.key
</VirtualHost>
</IfDefine>
<VirtualHost (our IP):80>
DocumentRoot /var/www/html/home/pa2
ServerName (our domain 2).com
ServerAlias www.(our domain 2).com
</VirtualHost>
(and then about 50 more hosted domains below that one.)
Now, if I configtest just like it is above, I get 50:
[Thu Nov 17 17:23:54 2005] [error] VirtualHost (our IP):80 -- mixing
*
ports and non-* ports with a NameVirtualHost address is not supported,
proceeding with undefined results
If I take out the NameVirtualHost line, I get 50:
[Thu Nov 17 16:37:15 2005] [warn] VirtualHost (our IP):80 overlaps w
ith
VirtualHost (our IP):80, the first has precedence, perhaps you need a
NameVirtualHost directive
If I leave in the line, but change all the IP addresses to their names
like this:
<VirtualHost www.(our domain 2).com>
DocumentRoot /var/www/html/home/pa2
ServerName (our domain 2).com
ServerAlias www.(our domain 2).com
</VirtualHost>
I get 50:
[Thu Nov 17 17:33:08 2005] [error] (EAI 2)Name or service not known:
Cannot resolve host name www.(our domain 2).com --- ignoring!
followed by 50:
[Thu Nov 17 17:33:12 2005] [warn] VirtualHost www.(our domain 2).com
:0
overlaps with VirtualHost www.(our domain 3).com:0, the first has
precedence, perhaps you need a NameVirtualHost directive
What combination of IP, port, names do I need to use?
I'm at the end of combinations I can think of.
Thanks for any help!
Liam
[ Post a follow-up to this message ]
|