Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

Aliasing a directory, which is already covered by a <location>

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


uff at lap

Nov 14, 2007, 3:55 AM

Post #1 of 2 (199 views)
Permalink
Aliasing a directory, which is already covered by a <location>

Hello!

I'm trying to configure Apache in a way that all requests to /xyz/i/
(and subdirectories) are pointed to a local directory while all other
requests to /xyz/ are handled by a handler defined in a <Location>
directive.

This so currently my configuration looks something like this:
Alias /pls/apex/i "/oracle/product/apex/images/"

<Location "/pls/apex">
Order deny,allow
AllowOverride None
SetHandler pls_handler
Allow from all
</Location>
(mod_plsql specific stuff removed)

The problem is, Apache processes the <Location> directives before
processing aliases, so the above doesn't work.
I tried restricting the <Location> to cover only URLs which don't
contain /i/ using regular expressions, but that didn't seem to work either.

Any ideas to solve this problem are welcome.


Taavi

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


joshua at slive

Nov 14, 2007, 6:15 AM

Post #2 of 2 (185 views)
Permalink
Re: Aliasing a directory, which is already covered by a <location> [In reply to]

On Nov 14, 2007 6:55 AM, Taavi Kuusik <uff [at] lap> wrote:
> Hello!
>
> I'm trying to configure Apache in a way that all requests to /xyz/i/
> (and subdirectories) are pointed to a local directory while all other
> requests to /xyz/ are handled by a handler defined in a <Location>
> directive.
>
> This so currently my configuration looks something like this:
> Alias /pls/apex/i "/oracle/product/apex/images/"
>
> <Location "/pls/apex">
> Order deny,allow
> AllowOverride None
> SetHandler pls_handler
> Allow from all
> </Location>
> (mod_plsql specific stuff removed)
>
> The problem is, Apache processes the <Location> directives before
> processing aliases, so the above doesn't work.

No, this is not an ordering problem. Apache ALWAYS processes BOTH. The
fact that the Alias pushes the request someplace else does not change
the fact that pls_handler is applied. There are a few different
solutions to this.

> I tried restricting the <Location> to cover only URLs which don't
> contain /i/ using regular expressions, but that didn't seem to work either.

It should work, but you haven't given us any details about this.

Alternatively, you could use
<Location /pls/apex/i>
SetHandler default-handler
</Location>

You probably need to list that BEFORE the existing <Location>.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.