1

Is it possible to have an HTTPS frontend for an HTTP server?

Let me elaborate. Say I have an app running on a tomcat instance and this app only understands HTTP. Is it possible to have Apache sit in front of the tomcat app and proxying the requests as shown below:

 http://example.com/proxied_app http://localhost:8080 +----------+ +----------+ | | | | | | | | Internet <----HTTPS--->| APACHE |<---------HTTP--------->| TOMCAT | | | | | | | | | +----------+ +----------+ 

2 Answers 2

9

Yes. That's what mod_proxy is for.

2
  • 2
    If you're connecting to a Tomcat instance, consider using mod_proxy_ajp. Same configuration but uses a Tomcat connector for better performance. Commented Jul 23, 2012 at 2:47
  • If you choose to use HTTP between webserver and tomcat, consider replacing apache by varnish for real performance reason Commented Dec 16, 2013 at 21:29
1

Jenny D answer is fine: just to add that in this case you can also use mod_jk when connecting Apache Httpd with Apache Tomcat.

3
  • 1
    These days mod_ajp is a much better option. Commented Jul 17, 2012 at 20:05
  • @bahamat do you mean mod_proxy_ajp? Commented Jul 23, 2012 at 2:46
  • @TomMarthenal: Yes, that's the one. (I didn't look it up, just wrote that from memory and I haven't used it in a while). Thanks. Commented Jul 23, 2012 at 15:15

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.