Danny
Danny

Reputation: 135

Apache virtual host not working points to main DocumentRoot

Apache virtual host is not working always points to main DocumentRoot default apache page

The default Document root in my centos server /var/www/html/

I have created a virtual host and have name its as demo.example.com

the virtual host config is

<VirtualHost 172.56.12.85:80>
ServerAdmin [email protected]
ServerName demo.exmaple.com
ServerAlias www.demo.example.com
DocumentRoot "/var/www/html/demo_product"
DirectoryIndex index.php
ErrorLog /var/www/html/demo_product/error.log
CustomLog /var/www/html/demo_product/requests.log combined
</VirtualHost>

How can I troubleshoot?

Upvotes: 0

Views: 1793

Answers (1)

Missaka Wijekoon
Missaka Wijekoon

Reputation: 899

Try to add the following before the VirtualHost section:

NameVirtualHost 52.78.89.56:80

Upvotes: 2

Related Questions