Creating subdomain in virtualhost in apache 2.0 on CentOS 6.4
I need to create subdomains on a web server with apache 2.0 , CentOS 6.4, PageSpeed + Apc. I have no DNS server. I need to use VirtualHost. My code: NameVirtualHost xx.xx.xx.xx <VirtualHost xx.xx.xx.xx> ServerName www.sub.domain.com ServerAlias sub.domain.com DocumentRoot /var/www/html/sub </VirtualHost> <VirtualHost xx.xx.xx.xx> ServerName www.domain.com ServerAlias domain.com DocumentRoot /var/www/html </VirtualHost> I have put this code in: /etc/httpd/conf.d/somename.conf and it does not work. Also in: httpd.conf , does not work. I'm doing the following: <VirtualHost *:80> DocumentRoot "