Forum Moderators: phranque

Message Too Old, No Replies

Help! Showing directory instead of index.html

         

brenda003

1:17 am on Jan 30, 2006 (gmt 0)

10+ Year Member



I'm working on setting up my dedicated server. I've got a virtual host set up now but when you go to the URL it's showing the directory contents instead of the index.html file. There's an index.html file right there and the DirectoryIndex is set properly in the httpd.conf file. I've gone over things a million times and cannot figure out why this is happening.

Does anyone have any experience with this problem?

moltar

1:18 am on Jan 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it showing the directory where the index.html file resides or is it showing some other random directory?

Do you actually see a file called index.html listed there?

brenda003

1:26 am on Jan 30, 2006 (gmt 0)

10+ Year Member



Yes, it is pointing to the right directory and I see the index.html file.

jdMorgan

1:31 am on Jan 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



brenda003,

Welcome to WebmasterWorld!

Can you show use the DirectoryIndex directive?

It should look like:


DirectoryIndex index.html

It's possible that it's not inside the right container.

Jim

brenda003

1:41 am on Jan 30, 2006 (gmt 0)

10+ Year Member



I'm not sure what you mean. It looks exactly like that:

DirectoryIndex index.html

Thanks for the welcome, I'm usually a lurker. :)

moltar

2:35 am on Jan 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Where did you place that directive?

brenda003

4:54 am on Jan 30, 2006 (gmt 0)

10+ Year Member



I'm still not quite sure what is meant by that.

It's in my httpd.conf file?

Sorry, this is the first time I have had to setup Apache myself.

jdMorgan

3:00 pm on Jan 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Directives such as DirectoryIndex are often specific to a single VirtualServer or Directory in the server. Therefore, they are placed inside "containers," for example, <VirtualServer> or <Directory>, which limit their scope of application. These containers can also be nested - with one inside the other, subject to Apache's "nesting rules" which are based on the containers' precedence.

If a directive is not placed within a container, or is placed in the wrong container, then it may not work as expected.

We're trying to find out 'where' your DirectoryIndex directive is located, as in "inside" what container(s) in the httpd.conf file.

Feel free to post a relevant snippet of your httpd.conf file, with the specifics obscured, such as domain name, IP address, and e-mail addresses.

Jim

brenda003

7:08 pm on Jan 30, 2006 (gmt 0)

10+ Year Member



It's not in any containers at all.

brenda003

7:18 pm on Jan 30, 2006 (gmt 0)

10+ Year Member



Hmm.. I fixed it, somehow. I think all I did was remove this line

Include /etc/apache2/conf.d/*.conf