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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-15-2003, 01:12 PM
|
#1
|
LQ Newbie
Registered: Jan 2003
Location: dundee ,uk
Posts: 13
Rep:
|
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
|
|
|
01-15-2003, 01:53 PM
|
#2
|
Member
Registered: Sep 2002
Distribution: Debian 3.0 (Sid)
Posts: 67
Rep:
|
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
|
|
|
01-15-2003, 02:18 PM
|
#3
|
LQ Newbie
Registered: Jan 2003
Location: dundee ,uk
Posts: 13
Original Poster
Rep:
|
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
|
|
|
01-15-2003, 03:10 PM
|
#4
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
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
|
|
|
01-15-2003, 03:29 PM
|
#5
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
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...
|
|
|
01-15-2003, 04:13 PM
|
#6
|
Member
Registered: Sep 2002
Distribution: Debian 3.0 (Sid)
Posts: 67
Rep:
|
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 04:14 PM.
|
|
|
01-15-2003, 04:18 PM
|
#7
|
Senior Member
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503
Rep:
|
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.
|
|
|
01-15-2003, 04:23 PM
|
#8
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
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...  )
|
|
|
01-15-2003, 04:23 PM
|
#9
|
LQ Newbie
Registered: Jan 2003
Location: dundee ,uk
Posts: 13
Original Poster
Rep:
|
thanks i will try this
|
|
|
01-15-2003, 04:28 PM
|
#10
|
Senior Member
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503
Rep:
|
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.
|
|
|
02-11-2003, 11:30 AM
|
#11
|
Member
Registered: Oct 2002
Posts: 57
Rep:
|
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!!!!
|
|
|
All times are GMT -5. The time now is 01:49 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|