proxy and mod_rewrite

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

 



Hello everyone,

I'm currently trying to allow access to several internal website on
one main https external website (the proxy server is using httpd
version "2.2.9-10+lenny6"). Bellow is my test vhost :

<IfModule mod_ssl.c>
<VirtualHost 192.168.172.112:443>
        ServerName test.lan
        ServerAdmin support@xxxxxxxx

        SSLEngine On
        SSLCertificateFile    /etc/ssl/certs/ssl-cert-
snakeoil.pem
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

        ProxyRequests Off
        <Proxy *>
                Order Deny,Allow
                Allow from all
        </Proxy>

        ProxyPass /test1/ http://test1.lan/
        ProxyPassReverse /test1/ http://test1.lan/
        <Location "/test1.lan/">
                AuthBasicProvider ldap
                AuthType Basic
                AuthName "test1.lan"
                AuthLDAPURL ldap://ldap.lan/dc=example,dc=lan?uid?sub?(uid=*)
                require valid-user
        </Location>

        ProxyPass /test2/ http://test2.lan/
        ProxyPassReverse /test2/ http://test2.lan/
        <Location "/test2.lan/">
                AuthBasicProvider ldap
                AuthType Basic
                AuthName "test2.lan"
                AuthLDAPURL ldap://ldap.lan/dc=example,dc=lan?uid?sub?(uid=*)
                require valid-user
        </Location>

</VirtualHost>
</IfModule>

Everything is working fine except that on some internal website, there
is hard coded request like "/app/MainServlet" and the result of that
request url is "https://test.lan/app/MainServlet"; where I want
"https://test.lan/test1/app/MainServlet";,
"https://test.lan/test2/app/MainServlet";, etc

I've tried some rewrite rule like :

                RewriteEngine On
                RewriteCond %{REQUEST_URI} ^/app/MainServlet.*
                RewriteRule ^(.*)$ https://%{SERVER_NAME}/test1%{REQUEST_URI}

But the issue is that several website have the same request
hardcoded... with this kind of rule, both test1 and test2
"/app/MainServlet" location point toward
"https://test.lan/test1/app/MainServlet";.

My idea was to look for the url from which the client came from, but I
didn't find any parameters like this in the documentation of
mod_rewire...

Any idea will be highly appreciated.

Regards,
Ace

---------------------------------------------------------------------
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