LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-29-2006, 10:00 AM   #1
jacobselvin
Member
 
Registered: May 2005
Location: Australia
Distribution: SUSE 10.1
Posts: 62

Rep: Reputation: 15
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.
 
Old 03-29-2006, 11:47 AM   #2
pdeman2
Member
 
Registered: Jul 2005
Location: Maine, USA
Distribution: OpenSUSE, Gentoo, Fedora, Ubuntu, Mandriva, others
Posts: 413

Rep: Reputation: 30
It sounds like there might be a virtual host conflict. Make sure that your default virtual host is configured for /srv/www/myhome.
 
Old 03-30-2006, 12:50 AM   #3
jacobselvin
Member
 
Registered: May 2005
Location: Australia
Distribution: SUSE 10.1
Posts: 62

Original Poster
Rep: Reputation: 15
How to check the default virtual host?
Thanx.
 
Old 03-30-2006, 01:17 AM   #4
Ellops
Member
 
Registered: Nov 2005
Location: ath.gr
Distribution: Slackware 11.0 / 2.6.19.1 /Linux Mint
Posts: 124

Rep: Reputation: 15
..................

Last edited by Ellops; 03-30-2006 at 01:21 AM.
 
Old 03-30-2006, 11:13 AM   #5
pdeman2
Member
 
Registered: Jul 2005
Location: Maine, USA
Distribution: OpenSUSE, Gentoo, Fedora, Ubuntu, Mandriva, others
Posts: 413

Rep: Reputation: 30
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.
 
Old 03-30-2006, 12:56 PM   #6
RHELL
Member
 
Registered: Feb 2004
Location: Outermost mingetty
Distribution: RHEL3,RH4U4,Sol9, Sol10
Posts: 321

Rep: Reputation: 31
`httpd -S`
 
Old 03-31-2006, 04:07 PM   #7
jacobselvin
Member
 
Registered: May 2005
Location: Australia
Distribution: SUSE 10.1
Posts: 62

Original Poster
Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
permissions difference between /home/..../folder and /root/folder darkleaf Linux - General 3 07-21-2005 05:23 PM
change the default dir fro apache2 dev_mohamed Linux - Software 5 06-22-2005 01:20 PM
How do I change document root in apache2 in Ubuntu? leemoreau Linux - Networking 4 03-30-2005 06:18 AM
change folder command eduac Linux - Software 4 07-14-2003 08:01 AM
Change folder permissions eggoz Linux - Newbie 2 03-17-2003 01:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration