Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
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.
Distribution: Fedora Core 3 and Suse 9.2 Pro mainly but trying others too...
Posts: 9
Rep:
Apache does not open index.html
Hi everyone,
My problem is;
i've created an index.html file in my /var/www/html/myfolder folder, and i want to see it in //myipaddress/myfolder address. But it does not find the address, it gives Page Not Found error (also, in explorer, it states that it can not found my server). When I try //myipaddress/myfolder/index.html it's ok, I see what I should see. Also for information only, //myipaddress and Apache Test Page works.
Any idea?
Note: // means internet I don't know how to state it, this forum does not allow me to use this tag, it says it is a spam . So // means abbreviation of hyper text transfer protocol
Post your apache config file. Most likely, its not set to look for index.html by default. I forget what the exact line says that sets that option. It might be DirectoryIndex.
Distribution: Fedora Core 3 and Suse 9.2 Pro mainly but trying others too...
Posts: 9
Original Poster
Rep:
It is a long one I can't post it here, but I here is my DirectoryIndex part:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var index.htm indes.shtml index.php index.php4 index.php3 index.phtml index.cgi
#
also I tried this:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html
#
Distribution: Fedora Core 3 and Suse 9.2 Pro mainly but trying others too...
Posts: 9
Original Poster
Rep:
Hmm, I will try to give an answer from what i've understand. Now I know that when you enter an address like www.webaddress.com/lala it should open the index.html file in the /var/www/html/lala folder. But mine doesn't do something like this, it can not find the www.webaddress.com/lala address although there is a folder named /var/www/html/lala and an index.html file in it.
For the some time I have been having the same problem, Apache would not find my index files unless I specifically went to that url //domain/index.html...
Your hint about the DirectoryIndex line helped... There was no content on that line in my conf file...
I added the file names to look for and it's working fine now...
Originally posted by ekinox p41elvis,
What do you mean by that?
to ApachePadowan,
It's. Here is my ls -ald output:
drwxr-xr-x 2 root root 4096 Apr 21 12:22 lala/
What I mean is: what did you set as "DocumentRoot" in you httpd.conf file.
This is how it can look:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"
Distribution: Fedora Core 3 and Suse 9.2 Pro mainly but trying others too...
Posts: 9
Original Poster
Rep:
Oh sorry, I am reading is as DocumentIndex , here is my conf. Everythink is OK I think...
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"
Last question... Are you using the Apache config GUI or are you manually manipulating the .conf file?
There are two DirectoryIndex settings: one at the beginning of the .conf file, and one within the Virtual Host container (or at least that is how my conf is set up). Both of them need to have the arguments...
Also, is your ISP blocking port 80? Cuz if they are, noone will be able to see your page, and all this stress and agrevation will be for naught...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.