httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] Newbie: Adding multiple Location directive to httpd.conf
Date Tue, 14 Nov 2006 18:30:14 GMT
On 11/14/06, Amit Khemka <> wrote:
> Hello List,
> I am using Apache/2.0.54 on Linux 2.6.11-1.1369_FC4smp.
> I have a python based application server with apache, which had added
> the following to htttpd.conf file:
> <Location />
>     SetHandler appserver-handler
> </Location>
> (I presume, to by default forward all request to the appserver)
> I wanted to add some php scripts, so i created directory
> "/var/www/html/php' and added fololwing to httpd.conf
> <Location /php/>
>         SetHandler php5-script
> </Location>
> It works with few catches, for example:
>  - When i access the url: http://localhost/php , it returns the error
> "permission denied", though i have added index.php to DirectoryIndex
> - http://localhost/php/index.php loaded, but with stylesheets, images
> etc, after looking around i found that browser was reporting error for
> wrong mime-type (ie. text/html instead of text/css)
> I tried the following (just in case the information could be useful):
> 1. I commented the app-server directives in httpd.conf -- SAME PROBLEMS
> 2. I commented both app-server and php directives in httpd.conf -- It
> works like charm
> 3. I also tried using .htaccess and Directory and few more random
> hacks, though couldnt figure out anything.
> Any help would be greatly appreciated.

The easiest fix would probably be to replace your <Location /> with a
regex that excludes /php.  Something like <LocationMatch ^/(?!php/)>
(untested).  Then use a regular AddHandler for that particular
directory to activate php.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message