Not able to change the root folder in apache2
I installed apache2 and everything went fine with the defalt home page which is mapped to /srv/www/htdocs. Now I want to change the default home to /srv/www/myhome. So I made the follwoing changes in default-server.conf file.
#DocumentRoot "/srv/www/htdocs" DocumentRoot "/srv/www/myhome" # # Configure the DocumentRoot # #<Directory "/srv/www/htdocs"> <Directory "/srv/www/myhome"> Options None AllowOverride None Order allow,deny Allow from all </Directory> After making this change if I run apache2ctl configtest I'm getting a output "Syntax OK". But when I restart my apache2 server it still points to the htdocs home page. Is there anything else I need to change to change the home folder? I checked the logs and everthing seems to be smooth and not able to find any errors. Could someone please help me resolving this problem. |
It sounds like there might be a virtual host conflict. Make sure that your default virtual host is configured for /srv/www/myhome.
|
How to check the default virtual host?
Thanx. |
..................
|
Well, seeing that your distro is SUSE, you should easily be able to determine this using YaST. Start up YaST -> Network Services -> httpd. There should be a section for virtual hosts, somewhere in there you can edit your default virtual host.
|
`httpd -S`
|
You are right pdeman2. When I use http://127.0.0.1/ it takes me to the default home page provided by apache2. When I use http://myserver/ it properly takes me to my home page. Thanks a lot for your help.
|
All times are GMT -5. The time now is 12:09 PM. |