Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I currently have a DYNDNS standard account and an apache webserver (call it srv1) that has all port 80 and port 443 traffic forwarded to it.

I have another webserver internally (call it srv2) that is configured with a reverse proxy from srv1 on port 80 from a subdomain.

It works but I can't get a reverse proxy from sv1 on port 443 to work.

share|improve this question
    
No special tricks needed, really. Can you provide your config (with sensitive details changed, if needed) so that we can look it over? –  Shane Madden Jan 8 '12 at 23:15
    
You'll most likely have to post the configs from srv1 to get this answered. –  Ladadadada Jan 8 '12 at 23:16
    
Please also specify where you would like the SSL termination to occur (srv1 or srv2) –  Mathias R. Jessen Jan 8 '12 at 23:17
    
Im trying to make it so domain.com goes to srv1 on port 80 and domain.com goes to srv1 on port 443 and then xxx.domain.com goes to srv2 on port 80 and xxx.domain.com goes to port 443 on srv2 –  Diego Gutierrez Jan 8 '12 at 23:26
add comment

1 Answer

up vote 0 down vote accepted

I would be willing to bet that you are trying to proxy HTTPS traffic. If you think about how HTTPS traffic works, it's entirely encrypted from client to server. In order to pass SSL HTTP traffic on to another server, you will need to receive the HTTPS on SRV1 and then pass it on the SRV2 as plain old HTTP. If your destination for the procy rule is an SSL VirtualHost, then it will be receiving HTTP traffic when it expects HTTPS.

This previous ServerFault question talks about how to configure this in detail but the general gist is:

#SRV1 Config
<VirtualHost *:443>
SSLEngine On
...other SSL params...
ProxyPass / http://ip.address.for.srv2/
</VirtualHost>

This can be worked around, have a look at this thread for an example. It's not very pleasant though, and by the sound of your use case probabaly easier to just offload the SSL at SRV1.

share|improve this answer
    
Well if it swaps to HTTP after its in passed the firewall then it would still be secure which is what im really trying to accomplish –  Diego Gutierrez Jan 8 '12 at 23:32
    
In that case your problem is easily solved. You have an SSL VirtualHost on your SRV1, and you use the proxy params to pass that traffic to an NON-SSL VirtualHost on SRV2 on it's internal address. –  SimonJGreen Jan 8 '12 at 23:35
    
so I'm still a bit confused can that be set up using virtualHosts and how would I would I accomplish this forwarding it to port 80 on srv2 –  Diego Gutierrez Jan 8 '12 at 23:45
    
<VirtualHost *:433> ServerName srv2.domain.com ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyErrorOverride On ProxyPass / xx.xx.xx.xx ProxyPassReverse / xx.xx.xx.xx <Location /> Order allow,deny Allow from all </Location> </VirtualHost> –  Diego Gutierrez Jan 8 '12 at 23:48
    
that was my config to try to do that same thing and it didnt work –  Diego Gutierrez Jan 8 '12 at 23:48
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.