LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-21-2005, 11:58 AM   #1
PiGuy
LQ Newbie
 
Registered: Jan 2005
Posts: 3

Rep: Reputation: 0
Apache won't display files in DocumentRoot


Hi,
I've installed Apache 2.0 successfully on Mandrake 10.1, but now I can't get it display any files in the Document Root. All I get is a standard welcomes/test page saying, "Congratulations! The Web Server software on this system is operational. If you're the webmaster of localhost, you may now add content to this directory and replace this page. " and so on. Do I need to finish configuring something first?
 
Old 01-21-2005, 12:04 PM   #2
damicatz
Member
 
Registered: May 2004
Distribution: FreeBSD 7, Debian "Squeeze", OpenBSD 4.5
Posts: 167

Rep: Reputation: 30
Re: Apache won't display files in DocumentRoot

Quote:
Originally posted by PiGuy
Hi,
I've installed Apache 2.0 successfully on Mandrake 10.1, but now I can't get it display any files in the Document Root. All I get is a standard welcomes/test page saying, "Congratulations! The Web Server software on this system is operational. If you're the webmaster of localhost, you may now add content to this directory and replace this page. " and so on. Do I need to finish configuring something first?
If you are using the default document root (should be some thing along the lines of /var/www/localhost/htdocs for Linux) you'll need to remove the standard index pages that come with Apache.
 
Old 01-21-2005, 12:06 PM   #3
PiGuy
LQ Newbie
 
Registered: Jan 2005
Posts: 3

Original Poster
Rep: Reputation: 0
I've done that, and replaced it with my own index.html. When that didn't work I've now moved it to a different location and it still shows the same thing. I can't figure out where this thing is stored.
 
Old 01-21-2005, 12:15 PM   #4
damicatz
Member
 
Registered: May 2004
Distribution: FreeBSD 7, Debian "Squeeze", OpenBSD 4.5
Posts: 167

Rep: Reputation: 30
Quote:
Originally posted by PiGuy
I've done that, and replaced it with my own index.html. When that didn't work I've now moved it to a different location and it still shows the same thing. I can't figure out where this thing is stored.
Have you tried restarting the Apache Webserver? Configuration changes in the main config files require a restart.

I don't know how Mandrakes Init Scripts Work but you should be able to restart Apache with the following command for now :

killall apache2 && sleep 5 && apache2

Last edited by damicatz; 01-21-2005 at 12:17 PM.
 
Old 01-21-2005, 12:17 PM   #5
PiGuy
LQ Newbie
 
Registered: Jan 2005
Posts: 3

Original Poster
Rep: Reputation: 0
okay, I got it working by deleting the files in the /var/www/html directory... why is this the main dir, and why does Apache tell me its in /usr/local/apache2/httpd? And now how can I change the DocumentRoot from /var/www/html to whatever I want?
 
Old 01-21-2005, 12:21 PM   #6
damicatz
Member
 
Registered: May 2004
Distribution: FreeBSD 7, Debian "Squeeze", OpenBSD 4.5
Posts: 167

Rep: Reputation: 30
Quote:
Originally posted by PiGuy
okay, I got it working by deleting the files in the /var/www/html directory... why is this the main dir, and why does Apache tell me its in /usr/local/apache2/httpd? And now how can I change the DocumentRoot from /var/www/html to whatever I want?
There should be an Apache configuration file. It looks like Mandrake may have a different default configuration for Apache than other distros as normally with Linux the default DocumentRoot is in /var/www/hostname/htdocs

As for your question, it is common for programs on *nix based systems to store their files in different directories as each directory on the root partition has it's own purpose.

/usr/local/apache2/httpd refers to the daemon itself.

If you wish to change the DocumentRoot you can edit your apache configuration file. The name is apache2.conf and it should be somewhere in your /etc directory. Try looking in the /etc/apache2 or /etc directories and if apache2.conf doesn't exist do this :

find /|grep apache2.conf
 
Old 01-21-2005, 01:33 PM   #7
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
Mine is in /etc/apache2/commonapache2.conf.I'm using gentoo,took me forever to change it!I kept changing /etc/apache2/apache2.conf but the same page came up,it was driving me nuts.
 
  


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
Changing Apache DocumentRoot walterbyrd Linux - Software 1 10-18-2005 03:30 PM
Apache DocumentRoot problem elliottsb Linux - Software 6 02-24-2005 09:40 PM
Apache httpd DocumentRoot question orange400 Linux - General 7 05-24-2004 03:41 AM
how to change apache documentroot tr3s Red Hat 6 08-31-2003 10:34 AM
DocumentRoot apache illtbagu Linux - Software 6 02-28-2003 12:04 AM


All times are GMT -5. The time now is 04:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration