httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Hracek <>
Subject [users@httpd] My own module, authorization and Proxy
Date Mon, 26 Apr 2010 08:36:40 GMT
Hello *,

In my Apache2 (2.2.3) configuration file I have:
<VirtualHost _default_:443>
SSLEngine on
SSLProxyEngine on
DocumentRoot "/opt/apache/htdocs/ssldocs"
ProxyPass       /PAC/
ProxyPassReverse    /PAC/

RewriteEngine on
RewriteRule .* - [F]
RewriteMap unity txt:/opt/apache/conf/
RewriteRule ^/([^/]+)$              ${unity:$1|/$1} [L]
RewriteRule ^/([^/]+)/(.*)  ${unity:$1|/opt/apache/htdocs/ssldocs/$1}/$2 [L]
RewriteRule ^/PAC$ [P]
RewriteRule ^/PAC/(.*)$1 [P]
RewriteLog "/var/log/apache2/rewrite_log"
RewriteLogLevel 3

<IfModule mod_authz_host.c>
    <Directory />
        Options +Indexes +Multiviews
        AuthType MSEC
        require valid-user
        satisfy Any

<Location "/PAC/">
    ProxyPassReverseCookiePath /PACCBAdmin /PAC
    AuthType  MSEC
   require valid-user


In the my modules which takes care about AAA, Security issues, etc.
I would like to do something like:
when user add to the URL following https://<ip_address>/PAC/
then first of all they should enter username/password authorization and
afterwards proxy page is opened. Authorization is done over AuthType MSEC in
my own module
When the RewriteRules are done as above then URL https://<ip_address>/PAC/
is authorized by my module
but page which is shown in browser is HTTP 404.

When the RewriteRule:
RewriteRule ^/PAC$ [P]
RewriteRule ^/PAC/(.*)$1 [P]
is moved before
RewriteRule ^/([^/]+)/(.*)  ${unity:$1|/opt/apache/htdocs/ssldocs/$1}/$2 [L]
then username/password page is not shown but /PAC/ URL is working (but
without authoziation.
As I found in the RewriteRule instead of row
RewriteRule ^/([^/]+)/(.*)  ${unity:$1|/opt/apache/htdocs/ssldocs/$1}/$2 [L]
which means that this RewriteRule is last should be something else.

Could you please help me with that issue

Thank you in advance

Best Regards / S pozdravem
Petr Hracek

View raw message