Hi all, If I have a virtualhost defind (which is working fine) with Servername set to www.somedomain.com can I add a second ServerName defining just somedomain.com so it is accessible by both www.somedomain.com and http://somedomain.com ? If not, how do I do it - do I have to have a VirtualHost for each ? Below is an example of my virtualhost: <VirtualHost xxx.xxx.xxx.250> ServerAdmin richard@somedomain.com DocumentRoot /home/site1 ServerName www.somedomain.com ErrorLog /home/site1/logs/error_log CustomLog /home/site1/logs/access_log common </VirtualHost> Thanks Richard
Richard Curtis wrote:
Hi all, If I have a virtualhost defind (which is working fine) with Servername set to www.somedomain.com can I add a second ServerName defining just somedomain.com so it is accessible by both www.somedomain.com and http://somedomain.com ?
If not, how do I do it - do I have to have a VirtualHost for each ? Below is an example of my virtualhost:
<VirtualHost xxx.xxx.xxx.250> ServerAdmin richard@somedomain.com DocumentRoot /home/site1 ServerName www.somedomain.com ErrorLog /home/site1/logs/error_log CustomLog /home/site1/logs/access_log common </VirtualHost>
http://httpd.apache.org/docs-2.0/vhosts/name-based.html Look for ServerAlias. Cheers, Andreas H
participants (2)
-
Andreas H
-
Richard Curtis