Report this

What is the reason for this report?

Problem with root and virtual host

Posted on July 4, 2013

Hi, I have installed lamp stack on centos for my domain1.com. Now I have created virtualhost for domain2.com. At first domain1 was pointing to the starting page of "apache ", but after I created virtual host for domain2.com and created a new file index.php, domain1.com is pointing to the same index.php for domain2.com.

Please help how to get the domain1.com “apache page” or how to proceed so that both the domains are pointing to their respective root directory.

Thanks in advance



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hmm. What’s the output of “ls /etc/httpd/conf.d”?

but after I created virtual host for domain2.com <br> <br>Where did you create that file?

What’s the output of “ls /etc/apache2/sites-enabled”?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.