LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Not able to change the root folder in apache2 (https://www.linuxquestions.org/questions/linux-software-2/not-able-to-change-the-root-folder-in-apache2-429653/)

jacobselvin 03-29-2006 10:00 AM

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.

pdeman2 03-29-2006 11:47 AM

It sounds like there might be a virtual host conflict. Make sure that your default virtual host is configured for /srv/www/myhome.

jacobselvin 03-30-2006 12:50 AM

How to check the default virtual host?
Thanx.

Ellops 03-30-2006 01:17 AM

..................

pdeman2 03-30-2006 11:13 AM

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.

RHELL 03-30-2006 12:56 PM

`httpd -S`

jacobselvin 03-31-2006 04:07 PM

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.