Problem with root and virtual host

Posted July 4, 2013 9.7k views
Hi, I have installed lamp stack on centos for my Now I have created virtualhost for At first domain1 was pointing to the starting page of "apache ", but after I created virtual host for and created a new file index.php, is pointing to the same index.php for Please help how to get the "apache page" or how to proceed so that both the domains are pointing to their respective root directory. Thanks in advance

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.

Submit an Answer
19 answers
Please post your directory structure and pastebin your apache virtualhost configs.
Sorry to say ...but I am a total newbie.. how to post my directory structure? and how to I copy the contents of virtualhost configs. from vi editor
You can run the following command to paste a file to

cat /etc/apache2/sites-enabled/filename | curl -F 'sprunge=
(Make sure you replace "filename" with the actual virtualhost file name).
Hi, my link for vhost is here --
Thanks for your help
What's the output of "ls /etc/apache2/sites-enabled"?
ls: cannot access /etc/apache2/sites-enabled: No such file or directory - there is an error message for this command
the above virtualhost file content has been taken from /etc/httpd/conf/httpd.conf
Sorry, "ls /etc/httpd/sites-enabled"
There is no "sites-enabled" directory in httpd.
the structure of httpd are :"conf conf.d logs modules run" only
Hmm. What's the output of "ls /etc/httpd/conf.d"?
Previous 1 2 Next