Redirect loop in nginx with ssl and proxy to a second server [closed]
This question does not appear to be about a specific programming problem, a software algorithm, or software tools开发者_开发百科 primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this questionI have two servers server1.abc.com and server2.abc.com. I need a setup where all requests to server1.abc.com/c/'anything' get proxied to a second server, all other requests served locally from the first server. I have it all working without SSL with simple configuration of nginx on server1:
location ~ .*/c/.* { proxy_pass http://server2.ccloop.com; }
Now I need to switch server1 to SSL, but I can have content from server2 served in clear or SSL, it does not matter. I made no changes to nginx config and tried it. No problem serving SSL traffic from server1, however proxying to server2 does not work - nginx on server1 goes into infinite redirect loop and nothing shows up in access logs on server2?
What am I missing here?
精彩评论