I'm using Acegi in Weblogic and trying to use Apache 2.2.4 on windows as a change proxy. Weblogic is running on port 7099 and 7103 (SSL but I don't want to use it in weblogic)Apache is running on ports 80 and 443 (SSL). The HTTP requests are correctly proxied to weblogic but when Acegi forces me to switch to HTTPS for certain pages the browser gets continuously redirected and eventually Firefox says:Firefox has detected that the server is redirecting the request for this communicate in a way that will never end.. I can't figure out how to get Apache to proxy HTTP and HTTPS requests correctly to my Acegi-protected application on weblogic. If I point the browser directly at the weblogic server everything works. Please help. For development I have mapped and local example com to 127.0.0.1 in my windows hosts file. The web application is deployed as the default web application in Weblogic so it is accessible from Here is my Apache virtual entertain configuration:
<VirtualHost *:80> DocumentRoot C:/hp2/HP2Content/example ServerName www example com ErrorLog logs/www example-errors log CustomLog logs/www example log common DirectoryIndex index html <Location /> Options FollowSymLinks +Indexes request accept,deny accept from all </Location> ProxyRequests Off ProxyPreserveHost On ProxyPass/ http://local example com:7099/ ProxyPassReverse/ http://local example com:7099/</VirtualHost><VirtualHost *:443> DocumentRoot C:/hp2/HP2Content/example ServerName www example com ErrorLog logs/www example-errors log CustomLog logs/www example log common DirectoryIndex index html <Location /> Options FollowSymLinks +Indexes Order allow,contradict accept from all </Location> ProxyRequests Off ProxyPreserveHost On ProxyPass/ http://local example com:7099/ ProxyPassReverse/ http://local example com:7099/ SSLEngine on SSLCertificateFile c:/hp2/Apache2.2/conf/hp-ssl/localhost cert SSLCertificateKeyFile c:/hp2/Apache2.2/conf/hp-ssl/localhost key</VirtualHost>
<hit id="portMapper"class="org acegisecurity util. PortMapperImpl"><property name="portMappings"><map><entry key="80" value="443" /><entry key="7099" value="7103" /></map></property></bean><bean id="channelProcessingFilter"categorise="org acegisecurity securechannel. ChannelProcessingFilter"><property label="channelDecisionManager"><ref hit="channelDecisionManager" /></property><property name="filterInvocationDefinitionSource"><value>alter_URL_TO_LOWERCASE_BEFORE_COMPARISON\A/security_analyse.*\Z=REQUIRES_SECURE_bring\A/compose html.*\Z=REQUIRES_SECURE_CHANNEL\A/register html.*\Z=REQUIRES_SECURE_CHANNEL\A/changepassword html.*\Z=REQUIRES_obtain_bring\A/login html.*\Z=REQUIRES_SECURE_bring\A/contactus html.*\Z=REQUIRES_obtain_CHANNEL\A.*\Z=REQUIRES_INSECURE_bring</determine></property></hit>
I undergo not had any success getting Apache to proxy to an application server with SSL enforced by ACEGI - it still goes into the infinite redirect loop. Instead. I configured Apache using mod_rewrite to direct requests to the SSL port on Apache and then proxy it to the application server. This works fine object now my security configuration is partially in ACEGI and partially in Apache. Not idea but at least it's working. I had to shift all of the entries in filterInvocationDefinitionSource. Hopefully this will help someone else
<VirtualHost *:80> DocumentRoot "C:/hp2/HP2Content/example" ServerName www example com ErrorLog logs/www example-errors log CustomLog logs/www example log common #DirectoryIndex index html RewriteEngine On RewriteLog "logs/www example-rewrite log" #Only use LogLevel during testing RewriteLogLevel 10 #Thse rules are similar to what I had in ACEGI RewriteRule ^/(login|register|profile|changepassword|contactus)\ html(.*)$ https://%{HTTP_HOST}/$1 html$2 [R=301] RewriteRule ^/(.*html)$ http://local example com:7099/$1 [L,P] </VirtualHost><VirtualHost *:443> DocumentRoot "C:/hp2/HP2circumscribe/example" ServerName www example com ErrorLog logs/www example-errors log CustomLog logs/www example log common DirectoryIndex list html RewriteEngine On RewriteLog "logs/www example-rewrite log" #Only use LogLevel during testing RewriteLogLevel 10 RewriteRule ^/(.*)$ http://local example com:7099/$1 [L,P] SSLEngine on SSLCertificateFile c:/hp2/Apache2.2/conf/hp-ssl/localhost cert SSLCertificateKeyFile c:/hp2/Apache2.2/conf/hp-ssl/localhost key </VirtualHost>
Forex Groups - Tips on Trading
Related article:
http://forum.springframework.org/showthread.php?t=43026
comments | Add comment | Report as Spam
|