LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How Do I Change The Default Directory For Apache? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-change-the-default-directory-for-apache-426743/)

Tear Syden 03-20-2006 06:38 PM

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 ***

geomatt 03-20-2006 08:04 PM

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

Tear Syden 03-20-2006 08:36 PM

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 ***

Tear Syden 03-21-2006 10:14 PM

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*

geomatt 03-21-2006 10:16 PM

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


All times are GMT -5. The time now is 08:03 PM.