Solved

httpd DirectoryIndex directive problem -not finding index.html

Posted on 2006-06-30
4
480 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
ID: 17017801
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
ID: 17035605
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

831 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