views:

180

answers:

2

I have an HTTP server which is in our internal network and accessible only from inside it. I would like to put another server that would listen to an HTTPS port accessible from outside, and forward the requests to that HTTP server (and send back the responses via HTTPS). I know that there are several ways to do this with some programming involved (and I myself made a temporary solution with Tomcat and a very simple servlet I wrote), but is there a way to do the same just plugging parts already made (like Apache + modules)?

+1  A: 

With Apache look into mod_proxy.

Apache 2.2 mod_proxy docs

Apache 2.0 mod_proxy docs

epochwolf
+2  A: 

This is the sort of use-case that stunnel is designed for. There is a specific example of using stunnel to wrap an HTTP server.

You should consider whether this is really a good idea, though. Web applications designed for use inside a corporate firewall are often fairly lax about security. Merely encrypting the connections prevents casual eavesdropping, but does not secure the site. If an attacker finds your outward facing server and starts connecting to it, they can still try to find exploitable flaws in the web service (SQL injection, cross-site scripting, etc).

DGentry
Yes, I'm aware of the risks, I plan to also add rules to the HTTP server so that only some specific URLs will be available to the outside connection.
Fabio Ceconello
+1 for the recommendation about site security
philippe