LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 03-20-2006, 07:38 PM   #1
Tear Syden
LQ Newbie
 
Registered: Mar 2006
Posts: 20

Rep: Reputation: 0
How Do I Change The Default Directory For Apache?


I've been searching for about two hours now and can't figure out how to change the default directory that Apache reads its index.html file from. Or at least the default directory that it calls pages from.

I've tried changing DocumentRoot "/var/www/html" to DocumentRoot "/home/dragonftp/html" which is where my ftp server goes.
(Frankly I am surprised to say that I actually got the FTP server working >.< )

I either need help with the above (preferrably) or help changing the ftp server (vsftpd) so that it accesses /var/www/html instead. (Since it gives me an error each time I try to connect to that directory even if I change the permissions XD )

If someone could at least point me in the right direction that would be great =)

Thanks for the help guys, you're all very kind to me and my noobness.

Running Red Hat Fedora Core 4
Apache... uh.. the latest one. 2.0.54 I think.

*** EDIT ***
I realise that my FTP server isn't quite working either. I can login from the actual server with an FTP client, but i cannot login from the windows PC on my network or anywhere else. If someone could help me with this it would be great. Sorry for all the questions.
*** END EDIT ***

Last edited by Tear Syden; 03-20-2006 at 07:46 PM.
 
Old 03-20-2006, 09:04 PM   #2
geomatt
Member
 
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Rep: Reputation: 30
Did you change the entry below that in the httpd.conf file the one that looks like this?

Code:
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
It's about 15 lines down from the DocumentRoot setting.

Did you restart apache with 'apachectl restart'?

What happens when you point your browser to http://localhost?


-geo
 
Old 03-20-2006, 09:36 PM   #3
Tear Syden
LQ Newbie
 
Registered: Mar 2006
Posts: 20

Original Poster
Rep: Reputation: 0
Something must be wrong here.

I tried changing the DocumentRoot setting and the <Directory> setting but now it won't even start up. It says that its an invalid directory. I checked, double-checked, and triple-checked that the permissions, spelling, and structure was correct. /home/dragonftp/html does exist, but Apache doesn't seem to think so >.<

Perhaps there is something else wrong with my config that I have missed. Thanks for teh help so far, I think I'm getting somewhere... even if its not evident yet

*** EDIT ***
When I have it back to the default settings (/var/www/html) it works perfectly fine since I have a webpage in there right now. I can view it with http://localhost OR by going to one of my network computers and accessing it from there.

"t DOT game-host DOT org" is the site if you want to go check it out and can somehow tell from there >.< (Replace DOT where implicated.)
*** END EDIT ***

Last edited by Tear Syden; 03-20-2006 at 09:39 PM.
 
Old 03-21-2006, 11:14 PM   #4
Tear Syden
LQ Newbie
 
Registered: Mar 2006
Posts: 20

Original Poster
Rep: Reputation: 0
Its been a day.

I've been working on it almost non-stop for a day now and can't find out how to do this anywhere. Please help me. *See above post*
 
Old 03-21-2006, 11:16 PM   #5
geomatt
Member
 
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Rep: Reputation: 30
That seems odd. Apache should be pretty easy to set up. Maybe you should post your httpd.conf and some details about your system. Did you try with other test directories to see if they work?

-geo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
acidrip, change default output directory shanenin Linux - Software 3 11-16-2010 12:42 AM
change default bash directory in gnome-terminal ming0 Linux - Software 5 10-01-2009 07:54 PM
proftp default directory how to change??? bgriesi Mandriva 3 12-29-2004 01:13 PM
change default save directory canyon289 Linux - Software 1 10-24-2004 01:16 AM
How to change default RPM install directory? mma8x Mandriva 2 07-12-2004 12:58 PM


All times are GMT -5. The time now is 03:50 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration