Question

I have a client who needs to use apache-tomcat as their web server for specific reasons. But I'd like to use unicorn as the application server and haven't seen many people doing this. Is there a way to do this?

No correct solution

OTHER TIPS

This is a bad idea. Ruby application servers like unicorn benefit from a general purpose web server like Apache or nginx being used a front-end, but using a Tomcat Java application server as a front-end adds extra complexity with much benefit.

That being said, you can configure the embedded Apache instance within Tomcat as a reverse proxy to serve traffic from a unicorn app server:

# Assuming unicorn running locally on port 8081:
ProxyPassReverse  /  http://localhost:8081/
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top