httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Hracek <phrac...@gmail.com>
Subject Authentication and ReverseProxy to more servers
Date Tue, 26 Jul 2011 13:22:09 GMT
Dear developers,

sorry for bother you with that question but I could not imagine where
I have made a problem?

Situation have to be following:
I have MAIN server connected to the intranet. To that MAIN server are
connected some other servers.
In the MAIN server is buildup proprietary authentication module which
is used for authorization and authentication.

When the user write down in URL somethink like:
https://<MAIN_server_IP>/application1 then this should be reversed
proxied to the http://192.168.0.20:8080/appl1
https://<MAIN_server_IP>/application2 then this should be reversed
proxied to the http://192.168.0.30:8080/appl2
Both applications like application1 and application2 have to be
authorized first in the MAIN server and than proxied to
the relevant servers.

Authentication works fine but it is not proxied.
In the /var/log/apache2/error_log file is not mentioned and log from
mod_proxy.c module
and ReverseProxy is not working at all.
In the log is mentioned only:
File does not exists: /srv/www/htdocs/ssldocs/application1
But this is true because of it has to be proxied.
Handlers in my modules are:
static void register_hooks(apr_pool_t * p)
{
 static const char * const
aszPre[]={"mod_proxy.c","mod_proxy_http.c","mod_proxy_ajp.c",NULL};
 ap_hook_auth_checker(access_handler,NULL,NULL,APR_HOOK_FIRST);
 ap_hook_check_user_id(auth_handler,NULL,NULL,APR_HOOK_FIRST);
}
Should be there add ap_hook_map_to_storage?

Could you please let me know how to do it?

Configuration file in MAIN server looks like:
<VirtualHost _default_: 443>
DocumentRoot "/srv/www/htdocs/ssldocs"
SSLEngine on
SSLProxyEngine on
ProxyRequests Off

<Directory proxy:*>
   AuthType OwnSec
   require valid-user
   Order Allow,deny
   Allow from all
</Directory>

ProxyPass /application1 http://192.168.0.20:8080/appl1
ProxyPassReverse /application1 http://192.168.0.20:8080/appl1
ProxyPass /application2 http://192.168.0.30:8080/appl1
ProxyPassReverse /application2 http://192.168.0.30:8080/appl2
</VirtualHost>

-- 
Best Regards / S pozdravem
Petr Hracek

Mime
View raw message