Solved

httpd DirectoryIndex directive problem -not finding index.html

Posted on 2006-06-30
4
469 Views
Last Modified: 2008-03-17
I'm running httpd-2.0.52 on centos 4.3 its new installation.

httpd.conf DirectoryIndex command is:
directoryindex index.html index.php
The is no DirectoryIndex command in any included file and no .htaccess file.

Problem occurs when specify http://sitename By default, index.html should be served up.
index.html and index.php both exist in the DocumentRoot dir. httpd serves up index.php by default and not index.html, despite the directoryindex command.

Despite re-editing httpd.conf, saving, and restarting httpd, problem persists. index.html is served when referenced explicit, and if index.php is renamed,
index.html is served.

Regards,
Addady
0
Comment
Question by:addady
4 Comments
 

Accepted Solution

by:
rubanek earned 125 total points
Comment Utility
This is a silly question but, are you sure you're editing the right httpd.conf?

do a:  ps aux | grep httpd

to find out which apache daemon is running.  then...

do a:  /path/to/daemon/httpd -V

and pay close attention to the following lines:

-D HTTPD_ROOT="/etc/httpd"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

so in this example the configuration file of the running apache server is:

/etc/httpd/conf/httpd.conf
0
 

Author Comment

by:addady
Comment Utility
Thank I found it,
There was
DirectoryIndex index.php
in
/etc/httpd/conf.d/php.conf

cat /etc/httpd/conf/httpd.conf
...
Include conf.d/*.conf
...


cat /etc/httpd/conf.d/php.conf
...
DirectoryIndex index.php
...

0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now