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 |
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/ |
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 |
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. |
I think it's placed in /home/httpd/html/index.html.
|
GREAT!, thanks so much
|
Quote:
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. :Pengy: == :study: |
All times are GMT -5. The time now is 06:33 AM. |