First virtual host becomes the default, so if a request comes for xyz.in or www.xyz.in or any other subdomain(except m.xyz.in) then its served from the first vhost or else from the later one, we can put as many vhosts as we wish. More information is available here .
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/html/pcmm/
ServerName www.xyz.in
CustomLog /var/log/httpd/access_log combined
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/html/mobilemm/
ServerName m.xyz.in
CustomLog /var/log/httpd/m_access_log combined
</VirtualHost>
Monday, March 16, 2009
apache httpd configuration for a domain and its subdomain
I basically wanted to serve different pages from xyz.in and m.xyz.in with separate logs for both, Here is what I had to put at the end of httpd.conf
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment