I have a domain -
Below are my DNS records.
example.com A IP address www.example.com A IP address
Here is my Apache virtual host configuration.
<VirtualHost *:80> ServerName www.example.com DocumentRoot /var/www/public_html/www.example.com </VirtualHost>
Now when I type
www part) in my browser I get default Apache page not file from
DocumentRoot. When I add
www to my domain everything is OK.
Now the question is how to set this up so that both domains
example.com serve the same file from document root? Should I handle this at DNS level or configure web server somehow? I am noob in all this so the question is probably stupid.