# Feedback on NGINX + Mongrel setup for multiple rails applica

**URL:** <https://www.ruby-forum.com/t/feedback-on-nginx-mongrel-setup-for-multiple-rails-applica/92167>\
**Category:** Deployment\
**Created:** [April 16, 2007, 8:13pm UTC](https://www.ruby-forum.com/t/feedback-on-nginx-mongrel-setup-for-multiple-rails-applica/92167 "2007-04-16T20:13:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![goodieboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ecc23a/32.png) [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Post date:** [April 16, 2007, 8:13pm UTC](https://www.ruby-forum.com/t/feedback-on-nginx-mongrel-setup-for-multiple-rails-applica/92167/1 "2007-04-16T20:13:20Z")

</div>

What I have setup now is working well. I’m hoping to get some feedback  
on this. Any potential problems with this setup?

I have a firewall setup to allow _only local_ access to the needed  
ports, except 80

In Apache 2.0 main conf file:

\<VirtualHost \*:80\>  
ProxyRequests Off  
ProxyPreserveHost on  
\<Location /app1\>  
ProxyPass [http://127.0.0.1:9020/app1](http://127.0.0.1:9020/app1)  
ProxyPassReverse [http://127.0.0.1:9020/app1](http://127.0.0.1:9020/app1)  
  
\<Location /app2\>  
ProxyPass [http://127.0.0.1:9020/app2](http://127.0.0.1:9020/app2)  
ProxyPassReverse [http://127.0.0.1:9020/app2](http://127.0.0.1:9020/app2)

In NGINX config file:  
[http://pastie.caboo.se/54245](http://pastie.caboo.se/54245)

## Mongrel Config for app1:

prefix: /app1  
cwd: /usr/local/projects/app1  
port: 9021  
environment: production  
pid\_file: log/mongrel.pid  
servers: 2

## Mongrel Config for app1:

prefix: /app2  
cwd: /usr/local/projects/app2  
port: 9030  
environment: production  
pid\_file: log/mongrel.pid  
servers: 2
