LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 06: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 06:46 PM.
 
Old 03-20-2006, 08: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, 08: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 08:39 PM.
 
Old 03-21-2006, 10: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, 10: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:43 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
Open Source Consulting | Domain Registration