Too Many Redirects
billmanhillman
nginx-forum at nginx.us
Fri Feb 1 15:38:37 UTC 2013
Proxy Pass is causing to many redirects when web.xml is upshifting to SSL
via security-constraint. It seems like tomcat doesn't like receiving
proxy_pass with http://localhost:8080 and tries to convert to SSL again.
What gives? Configs follow...
Nginx 1.2.6 Config:
server {
listen www.mydomain.com:80;
listen www.mydomain.com:443 ssl;
ssl_certificate my.crt;
ssl_certificate_key my.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
location / {
proxy_pass http://localhost:8080;
}
location /images {
root /var/www;
}
}
----------------------------------------------------------------------------
Web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>Billing</web-resource-name>
<url-pattern>/billing/*</url-pattern>
</web-resource-collection>
<web-resource-collection>
<web-resource-name>Shipping</web-resource-name>
<url-pattern>/shipping/*</url-pattern>
</web-resource-collection>
<web-resource-collection>
<web-resource-name>Register</web-resource-name>
<url-pattern>/subscription/*</url-pattern>
</web-resource-collection>
<web-resource-collection>
<web-resource-name>Contact</web-resource-name>
<url-pattern>/contactus.url</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
------------------------------------------------------------------------------------------
Tomcat Server.xml
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="443" <!-- This tell tomcat what port to use
when security-constraint is provided in web.xml -->
proxyName="www.mydomain.com"
proxyPort="80"/>
Please help.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,235822,235822#msg-235822
More information about the nginx
mailing list