Solved

httpd DirectoryIndex directive problem -not finding index.html

Posted on 2006-06-30
4
476 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Issues with SSL enablement in Apache 2.0.50 6 22
setting up tomcat for external access 4 72
Utility for identifying files that are different 5 82
PHP Register global 21 87
In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
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). #…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 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