LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-15-2003, 02:12 PM   #1
muhammade
LQ Newbie
 
Registered: Jan 2003
Location: dundee ,uk
Posts: 13

Rep: Reputation: 0
Red Hat Linux 8 Apache index.html file


I have new to Linux.

I have recently installed Red Hat Linux 8, as i want to set a computer as aserver in a university project. the problem is that after i set up the server, the page comin up is the test page. i try to locate the test page in order to delete it and so place my site.

Could some one please help
 
Old 01-15-2003, 02:53 PM   #2
kmistry
Member
 
Registered: Sep 2002
Distribution: Debian 3.0 (Sid)
Posts: 67

Rep: Reputation: 15
usually the document root for the website is located in /var/www

depending on your configuration you automatically can share your files in ur home (such as /home/yourusername/public_html/index.php) and it will come up as: http://yoursite/~yourusername/index.php
 
Old 01-15-2003, 03:18 PM   #3
muhammade
LQ Newbie
 
Registered: Jan 2003
Location: dundee ,uk
Posts: 13

Original Poster
Rep: Reputation: 0
thanks for your feedback

i have allocated a site in the /var/www/html but i think an index.html is being generated.

My IP is 134.36.16.12
when i put
134.36.16.12/index.html
i get my website, but without writting index.html get the test page

Cheers
 
Old 01-15-2003, 04:10 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 77
The test page is the result of a script. If you want your own content to be served simply place your own index.html into your document root, which by default in RH 8 is /var/www/html
 
Old 01-15-2003, 04:29 PM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 77
It should work fine, you don't need to disable anything. Check your httpd.conf and make sure that:
Code:
DocumentRoot "/var/www/html/"
and also:

Code:
DirectoryIndex index.html
make sure that you have your own index.html located in /var/www/html/ and restart apache if neccesary so it re-reads its config files ie: "apachectl restart"

The file you are seeing is called /var/www/error/noindex.html but I think if you delete it you will get errors. Try to get apache configured properly rather than deleting this file...
 
Old 01-15-2003, 05:13 PM   #6
kmistry
Member
 
Registered: Sep 2002
Distribution: Debian 3.0 (Sid)
Posts: 67

Rep: Reputation: 15
right on the dot, there should be a conf file (i think /etc/httpd.conf or /etc/init.d/httpd.conf)

or just find: find / -name httpd.conf

inside your httpd.conf file should be commented / un commented module lines and down below (use your fav editor to search) there should be something that tells what apache goes for in a dir first. if you use php and other things you'll have to add index.php in there also.

btw: fast webserver!

Last edited by kmistry; 01-15-2003 at 05:14 PM.
 
Old 01-15-2003, 05:18 PM   #7
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
I have had the same problem with Apache. When I went through the GUI and set up Apache to use index.html as my default file it seemed to have actually DELETED the index.html. What I mean is after applying the changes through the GUI i went into my httpd.conf and found this line

DirectoryIndex

with no index.html after it. I simply added index.html after DirectoryIndex and it worked fine. I think this is just a bug in the Server Configuration GUI.
 
Old 01-15-2003, 05:23 PM   #8
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 77
Quote:
there should be a conf file (i think /etc/httpd.conf or /etc/init.d/httpd.conf)
In redhat 8 it is /etc/httpd/conf/httpd.conf

Quote:
I think this is just a bug in the Server Configuration GUI.
I reccomend not using this tool, as it does more harm than good. Everytime you run it it overwrites httpd.conf with a new one, so any adustments you make will be lost...try to edit by hand (you will learn more about apache configuration anyway, which is a good thing... )
 
Old 01-15-2003, 05:23 PM   #9
muhammade
LQ Newbie
 
Registered: Jan 2003
Location: dundee ,uk
Posts: 13

Original Poster
Rep: Reputation: 0
thanks i will try this
 
Old 01-15-2003, 05:28 PM   #10
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Yes I agree bulliver. I learned that the hard way. Edit /etc/httpd/conf/httpd.conf and make sure the line says:

DirectoryIndex index.html

This will work I promise. Don't forget to restart Apache after you make the changes.
 
Old 02-11-2003, 12:30 PM   #11
SchoolITguy
Member
 
Registered: Oct 2002
Posts: 57

Rep: Reputation: 15
Ahhh!! I have been tring to figure out this problem for weeks. My config file just had DirtoryIndex it was missing the index.html. I put that in there and it worked fine. Man that is nerve racking. Thanks for posting this!!!!
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache problem - cannot get index.html file to show nebloof Linux - Software 3 01-15-2005 11:32 PM
Apache won't default to index.html TexasDex Linux - Software 5 04-05-2004 09:33 AM
Konqueror + file:/usr/share/doc/HTML/index.html jon_k Linux - Software 2 11-25-2003 06:06 AM
Apache 2.0 search for index.html file pawlub Linux - Software 2 10-28-2003 11:03 AM
can't view apache index.html jefftrwmy Linux - Software 1 04-24-2002 09:57 PM


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