|
Home > Archive > Web Servers on Unix and Linux > September 2006 > index.html and index.php
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
index.html and index.php
|
|
| dubing@gmail.com 2006-09-16, 7:27 pm |
| Hi,
If both index.html and index.php exist in the document root, where
defines which one will be shown? In my case, index.php runs, but I
want to show index.html. My httpd.conf has:
DirectoryIndex index.html index.html.var
Thanks in advance,
Bing
| |
| Ottavio Caruso 2006-09-16, 7:27 pm |
| dubing@gmail.com wrote:
> If both index.html and index.php exist in the document root, where
> defines which one will be shown?
The order of precedence
>In my case, index.php runs, but I
> want to show index.html.
Then put index. php after index .html:
DirectoryIndex index.html index.php
Ottavio
| |
| dubing@gmail.com 2006-09-16, 7:27 pm |
| Ottavio Caruso wrote:
> dubing@gmail.com wrote:
>
>
> The order of precedence
>
>
> Then put index. php after index .html:
>
> DirectoryIndex index.html index.php
>
Thanks.
Hmmm...I'm still confused. With my current setting "DirectoryIndex
index.html index.html.var", that should already for the apache server
(2.0.52) to know go to get index.html because that's listed first. I
don't think adding index.php is even needed. But I tried it. Now it's
like 'DirectoryIndex index.html index.php index.html.var'. After
'/sbin/services httpd reload', http://www.site.edu/ still shows
index.php. Then I deleted index.php, now index.html shows up. Why?
Bing
| |
| Dave Abbott 2006-09-18, 7:24 am |
|
On Fri, 15 Sep 2006 07:46:38 -0700, dubing wrote:
> Hmmm...I'm still confused. With my current setting "DirectoryIndex
> index.html index.html.var", that should already for the apache server
> (2.0.52) to know go to get index.html because that's listed first. I
> don't think adding index.php is even needed. But I tried it. Now it's
> like 'DirectoryIndex index.html index.php index.html.var'. After
> '/sbin/services httpd reload', http://www.site.edu/ still shows
> index.php. Then I deleted index.php, now index.html shows up. Why?
>
Possibly because Apache has an additional config
directory: /etc/httpd/conf.d/, within which there may be
a file php.conf. This may have a "DirectoryIndex index.php" line
that overrides one in httpd.conf
Or I maybe not
--
Dave Abbott, UNIX SysAdmin |
Department of Computer Science | http://www.dcs.shef.ac.uk/
The university of Sheffield |
| |
| cwallenstein 2006-09-20, 1:16 pm |
| quote:
Possibly because Apache has an additional config
directory: /etc/httpd/conf.d/, within which there may be
a file php.conf.
I have personally run into this issue before, and think that this is indeed your problem. Check the conf.d directory. |
|
|
|
|