| Fedora This forum is for the discussion of the Fedora Project. |
| 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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-26-2005, 02:46 PM
|
#1
|
|
Member
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 272
Rep:
|
Apache + where to place web pages??
Hey all, im trying to learn Apache so i can serve my own web page.
A) Does anyone have a good site for tutorials using apache
B) Right how i can only access the index.html file (which i cannot find on my system), from http://127.0.0.1. So i wrote a 2 line html file and place it in /var/www/html/example.html.
I restarted the httpd server, and yet the same index.html file is still there, not my 2 liner??
What im pretty much looking for, is a step by step tutorial to configuring and using apache.
THanks so much for the help.
Josh
|
|
|
|
05-26-2005, 03:15 PM
|
#2
|
|
Senior Member
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151
Rep:
|
Rename example.html to index.html.
Or you can modify httpd.conf to include example.html in the search list (just kidding). By default, Apache only searches for a limited list of .html files.
And be sure to look at http://httpd.apache.org/docs-2.0/
|
|
|
|
05-26-2005, 03:21 PM
|
#3
|
|
Member
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 272
Original Poster
Rep:
|
your saying that when i want to add a page it can only be named index.html???
And in the /etc/httpd/conf/httpd.conf file i have listed as document root "/var/www/html"
IN this file i have example.html, which i will rename index.html. Is this correct??
Thanks so much!!
josh
|
|
|
|
05-26-2005, 03:59 PM
|
#4
|
|
Senior Member
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151
Rep:
|
Look in httpd.conf for DirectoryIndex. It will be followed by a list of files that Apache will attempt to load.
It will typically look like this:
httpd.conf:
...
DirectoryIndex index.php index.html index.htm index.shtml
...
If your file is not on the list, then Apache will not attempt to load it.
|
|
|
|
05-26-2005, 04:05 PM
|
#5
|
|
Member
Registered: Mar 2003
Distribution: FreeBSD 6.1, NetBSD 3.0.1
Posts: 170
Rep:
|
I think it's placed in /home/httpd/html/index.html.
|
|
|
|
05-26-2005, 07:30 PM
|
#6
|
|
Member
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 272
Original Poster
Rep:
|
GREAT!, thanks so much
|
|
|
|
06-01-2005, 03:27 PM
|
#7
|
|
LQ Newbie
Registered: Jun 2005
Location: Oslo, Norway
Posts: 2
Rep:
|
Quote:
Originally posted by blizunt7
your saying that when i want to add a page it can only be named index.html???
And in the /etc/httpd/conf/httpd.conf file i have listed as document root "/var/www/html"
IN this file i have example.html, which i will rename index.html. Is this correct??
Thanks so much!!
josh
|
Apache will display any *.html (and *.htm) and serve any file you care to name.
However, when you go to the url: http://127.0.0.1/ Apache (running on you local machine) will give you a default page for that folder (There was no mentioning of any file in that request, so apache will use the default. If (AND ONLY IF) that fails, Apache will list the contents of the folder, if it has parissions to read it.).
The list mentioned in the earlier post is part of the Apache configurtation file(/etc/httpd/conf/httpd.conf). This is the list of default names Apache will use. If Apache cant find a index.html in the dokument root (whitch is typically /var/www/html/ on a Fedora box), it will use the next in the list. (Next in that list, is probably index.htm. possibly followed by default.html...)
If you tried to look at http://127.0.0.1/example.html you would get your example.html.
And naturally, the same goes for any other file under the document root.
 == 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:53 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
|
|