httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Iago <i...@iago.net>
Subject [users@httpd] Proxying Problem: Need DirectoryMatch help!
Date Thu, 03 Oct 2002 17:53:52 GMT
What I'm using:

    Server: Apache/1.3.20 (Unix)

The problem:

    I'm currently facing an "open proxy" problem --
    introduced by my desire to get requests proxied for one
    host and one host only.

    I need help figuring out what to feed into
    <DirectoryMatch> directives, in order to make the
    following plain-english ruleset work:

        1) If you receive a proxy request for
           http://foo.com/ -- proxy it, regardless of
           source.

        2) If you receive a proxy request for any host
           _other than_ http://foo.com -- refuse to proxy
           it, period.

    Now, I thought I had this licked by using these directives:

    <DirectoryMatch "^proxy:http://foo.com">
        Order deny,allow
        Allow from all
    </DirectoryMatch>

    <DirectoryMatch "^proxy:(?!http://foo.com)">
        Order allow,deny
        Deny from all
    </DirectoryMatch>

    In my world, the second directive would deny all
    requests that are not-foo-dot-com, and the first would
    allow all requests that are foo-dot-com, and there
    would be no problems, ever, for anything, since the
    two patterns would, at first blush, appear to be 
    mutually exclusive.

    Naturally, it's not working, and all proxy requests
    for all urls are getting allowed.

    What gives?  How can I make it work?

-- 
Fred Hicks <iago AT iago DOT net>

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


Mime
View raw message