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.

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  |
                       |          |                        |          |
                       |          |                        |          |
                       +----------+                        +----------+
share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

Yes. That's what mod_proxy is for.

share|improve this answer
2  
If you're connecting to a Tomcat instance, consider using mod_proxy_ajp. Same configuration but uses a Tomcat connector for better performance. –  Tom Marthenal Jul 23 '12 at 2:47
    
If you choose to use HTTP between webserver and tomcat, consider replacing apache by varnish for real performance reason –  Eric DANNIELOU Dec 16 '13 at 21:29
add comment

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.

share|improve this answer
1  
These days mod_ajp is a much better option. –  bahamat Jul 17 '12 at 20:05
    
@bahamat do you mean mod_proxy_ajp? –  Tom Marthenal Jul 23 '12 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. –  bahamat Jul 23 '12 at 15:15
add comment

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.