# Nginx Reverse Proxy--What is http://mongel?

**URL:** <https://www.ruby-forum.com/t/nginx-reverse-proxy-what-is-http-mongel/107850>\
**Category:** Deployment\
**Created:** [June 26, 2007, 9:41pm UTC](https://www.ruby-forum.com/t/nginx-reverse-proxy-what-is-http-mongel/107850 "2007-06-26T21:41:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Culbreth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/439d5e/32.png) [@Matt\_Culbreth](https://www.ruby-forum.com/u/Matt_Culbreth)\
**Post date:** [June 26, 2007, 9:41pm UTC](https://www.ruby-forum.com/t/nginx-reverse-proxy-what-is-http-mongel/107850/1 "2007-06-26T21:41:27Z")

</div>

Hello Group,

I’ve got my Rails app deployed as a Mongrel cluster behind an Nginx  
reverse proxy. It’s working great except for one small issue: if I  
have code that does a redirect\_to , the browser is  
redirecting to [http://mongrel](http://mongrel). What I’d like to have it direct to is  
“http:///”. Does that make sense?

Here’s my Nginx config file:

```
upstream mongrel {
    server 127.0.0.1:9000;
    server 127.0.0.1:9001;
    server 127.0.0.1:9002;
}

```

```
server {
    listen 80;
    server_name <my domain name>;
    root <my deployment path>;

```

```
    location / {
        proxy_pass http://mongrel;
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For

```

$proxy\_add\_x\_forwarded\_for;  
}

---

<div class="post-metadata">

**Author:** ![Matt\_Culbreth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/439d5e/32.png) [@Matt\_Culbreth](https://www.ruby-forum.com/u/Matt_Culbreth)\
**Post date:** [January 12, 2008, 8:48pm UTC](https://www.ruby-forum.com/t/nginx-reverse-proxy-what-is-http-mongel/107850/2 "2008-01-12T20:48:56Z")

</div>

I think you need to setup a reverse proxy or something.

Matt Culbreth wrote:

> Hello Group,
> 
> I’ve got my Rails app deployed as a Mongrel cluster behind an Nginx  
> reverse proxy. It’s working great except for one small issue: if I  
> have code that does a redirect\_to , the browser is  
> redirecting to [http://mongrel](http://mongrel). What I’d like to have it direct to is  
> “http:///”. Does that make sense?
