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  |
                       |          |                        |          |
                       |          |                        |          |
                       +----------+                        +----------+
auser
  • 121
  • 4

2 Answers2

9

Yes. That's what mod_proxy is for.

Jenny D
  • 27,780
  • 21
  • 75
  • 114
  • 2
    If you're connecting to a Tomcat instance, consider using [`mod_proxy_ajp`](http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html). Same configuration but uses a Tomcat connector for better performance. – Tom Marthenal Jul 23 '12 at 02:47
  • If you choose to use HTTP between webserver and tomcat, consider replacing apache by varnish for real performance reason –  Dec 16 '13 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.

Mixmar
  • 21
  • 2