Question

Problem with root and virtual host

Posted July 4, 2013 9.7k views
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

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 sprunge.us:

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 -- http://pastebin.com/8ptA0BWC
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