My own module, authorization and Proxy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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/ http://192.168.187.101:8080/PACCBAdmin
ProxyPassReverse /PAC/ http://192.168.187.150:8080/PACCBAdmin/
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
RewriteMap unity txt:/opt/apache/conf/unity.map
RewriteRule ^/([^/]+)$ ${unity:$1|/$1} [L]
RewriteRule ^/([^/]+)/(.*) ${unity:$1|/opt/apache/htdocs/ssldocs/$1}/$2 [L]
RewriteRule ^/PAC$ http://192.168.187.150:8080/PACCBAdmin [P]
RewriteRule ^/PAC/(.*) http://192.168.187.150:8080/PACCBAdmin/$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
</Directory>
</IfModule>
<Location "/PAC/">
ProxyPassReverseCookiePath /PACCBAdmin /PAC
AuthType MSEC
require valid-user
</Location>
</VirtualHost>
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$ http://192.168.187.150:8080/PACCBAdmin [P]
RewriteRule ^/PAC/(.*) http://192.168.187.150:8080/PACCBAdmin/$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
[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]