I have a VPS on which I am running Apache 2 (CentOS v5). I have my DNS setup as follows ...
(A Record) exampledomain.com points to 123.456.789.123 (CName Record) www.exampledomain.com points to exampledomain.com.
My question is what
ServerAlias values do I use in my Virtual Hosts configuration file so that visitors will be directed to my website whether they use
exampledomain.com. Ideally I would like the hostname of the server to be reported as
I have this currently but I find it directs the user to the Apache default page. I am trying to follow the directions at the Apache Documentation site but I must be messing something up.
<VirtualHost *:80> ServerAdmin firstname.lastname@example.org DocumentRoot /var/www/exampledomain.com ServerName exampledomain.com ServerAlias *.exampledomain.com ErrorLog /var/log/exampledomain.com-error-log CustomLog /var/log/exampledomain.com-access-log common </VirtualHost>
Any example of what I am trying to acheive would be Google. Regardless of if I type
www.google.com the URL changes to