Forum Moderators: phranque

Message Too Old, No Replies

welcome.conf

         

Crump

2:29 pm on Jul 22, 2005 (gmt 0)

10+ Year Member



Apache welcome.conf allows you to set up a default welcome page. Mine looks like this:

<LocationMatch "^/+$">
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>

It works fine. If the user does not have a index.htm page in their directory, it shows this page. Now, the odd thing is, if I change the 3rd like to:

ErrorDocument 403 /error/noindex.php

(basically changing to php), then I get a forbidden error. Looking at the error_log, it says:

Directory index forbidden by rule: /home/thissite/www/

PHP works fine, if put the same php file right in the home dir, no problem.

Any ideas?

jdMorgan

3:43 pm on Jul 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Crump,

Welcome to WebmasterWorld!

What version of Apache are you running?
Did you configure this server yourself, or is it commercially-hosted?

Jim

Crump

4:13 pm on Jul 22, 2005 (gmt 0)

10+ Year Member



Jim,
Thanks for the reply:
Apache/2.0.51 (Fedora)

It is a VPS, so I can configure it to my liking.

I usually don't get stumped so easily. I wonder if this is a PHP or Apache problem? PHP is running as CGI (not apache module)

Thanks for any help

jdMorgan

6:38 pm on Jul 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The reason I asked about your Apache version is that a very common problem with Apache 1.x is that the module load order specified by LoadModule determines the processing order of modules -- The processing order is the reverse of the order of the LoadModule list. So, people add PHP to the end of the list, and various things break --such as mod_rewrite and mod_auth-- because PHP gets control first before these modules can be invoked.

This does not Apply to Apache 2.x, because module priority is handled differently. It also doesn't apply in your specific case, since you're not running PHP as a module.

So, I'm stumped too. If you don't get any useful answers here, you might want to ask over in the PHP forum; There may be more people there who've seen this problem before.

Jim