[users@httpd] Reverse Proxy -- excluding files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm wonder how to *not* proxy some content.

My existing front uses a simple reverse proxy (and mod_cache) setup.

the proxy setup is:

    Listen 80
    <VirtualHost *:80>
        ServerAlias www.example.com

        <Location />
            Allow from all
        </Location>

        ProxyPass               /  http://127.0.0.1:10080/

    </VirtualHost>

And I also do the following to handle images directly on the front end
server:

    CacheDisable    /images
    ProxyPass       /images !

    <Directory /home/moseley/docroot/images>
        ExpiresActive On
        Allow from all
    </Directory>

I also do that with /css and /js, for example.


If a request comes in for /foo/bar.jpg it will get sent to the
back-end server (the backend handles requests to /foo/ normally).
I'd like to handle that request in the front-end server.  That is,
I'd like to match on, say, /\.(jpe?g|gif|swf|pdf)$/.

The backend has a different document root, so that a request for

    /foo/bar.jpg

would not be proxied and also be re-written as:

    /backend/foo/bar.jpg

The rewrite shouldn't be hard, but I'm not clear how to *not* proxy
the request.

Any suggestions?


(Actually, I could probably *not* proxy any request that has an
extension ([^/]\.\w+$) that doesn't end in .html?  I.e.:

    /foo            - proxy
    /foo/           - proxy
    /foo/bar        - proxy
    /foo/bar.html   - proxy
    /foo/bar.123    - don't proxy

-- 
Bill Moseley
moseley@xxxxxxxx


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux