Greetings,
I have a question about VirtualHost'ing options on Apache 1.1.3. I have
had success using the <VirtualHost> option without a dedicated IP (yes,
I know the pros and cons) for non-critical domain hosting.
This has worked well for for www.domain.com however, I would like the
domain to be accessible via either domain.com and www.domain.com. I have
read the relevant document at apache.org, and it states that I should
use the ServerAlias command within the VirtualHost tags.
I have tried the following:
<VirtualHost domain.com>
ServerAlias domain.com *.domain.com
...other stuff...
</VirtualHost>
<VirtualHost www.domain.com>
ServerAlias domain.com *.domain.com
...other stuff...
</VirtualHost>
The DNS records contain A records for both domain.com and www, both of
which point to the servers IP.
The above both yield the correct results when trying www.domain.com, but
return the servers main page when trying just domain.com.
Any ideas?
Thanks,
S. William Schulz