Can someone crack this mystery?

Hi all,

I just setup a general test server on my DSL connection. Everything is working- mail, ftp, etc. The problem is named-based hosting. When configured properly, it keeps resolving to the Apache default page. I’ve been at this 5 long days, and have tried everything, but it won’t work.

However…

If I do this:

ServerName host.domain.com
NameVirtualHost *


<VirtualHost *>
ServerName www.domain.com
DocumentRoot /home/directory/public_html
ServerAlias www.domain.com domain.com
DirectoryIndex index.php index.html index.htm index.shtml
ScriptAlias /cgi-bin/ /home/domain/public_html/cgi-bin/

</VirtualHost>

Hey it, works! The problem however, is most hosts stopped doing this awhile back, and in addition, you must disable SSL and some other stuff, otherwise the wildcard will cause Apache to attempt to use all ports in the httpd file. On top of that, I can’t setup the first account as IP based, or use SSL with this method.

It *Should* work with:

ServerName host.domain.com
NameVirtualHost 123.456.789.10

<VirtualHost 123.456.789.10>
ServerName www.domain.com
DocumentRoot /home/directory/public_html
ServerAlias www.domain.com domain.com
DirectoryIndex index.php index.html index.htm index.shtml
ScriptAlias /cgi-bin/ /home/domain/public_html/cgi-bin/

</VirtualHost>

But it won't Can someone crack this mystery?

ARRGH! It works for every other host I’ve ever used, so why won’t it work here? I was thinking perhaps a DNS problem of some sort, but then why will it work with a wildcard, and why do all other web services function as normal? Even worse, I’ve tested Plesk and Ensim on it, and even with their configuration, same thing… Named-Based 'will not' work.

Any clues would be muchly appreciated,

Thanks!

 

 

 

 

Top