Nginx as proxy server

Hi

Is there a documentation on setting up nginx as proxy server

Thanks and Regards

Kaushal

Hello Kaushal,

Tuesday, May 20, 2008, 6:10:56 PM, you wrote:

Hi

Is there a documentation on setting up nginx as proxy server

http://wiki.codemongers.com/NginxConfiguration

Thanks and Regards

On Tue, May 20, 2008 at 5:24 PM, Denis F. Latypoff [email protected]
wrote:

Thanks and Regards

Hi Denis

Thanks for the quick reply

I have this in the “nginx.conf” file and have restarted ngnix. Basically
I
want to set it as a simple proxy server

    location / {
        root   /var/www/example/htdocs;
        index  index.html index.htm;
        proxy_pass http://localhost:8000;
    }

Am i missing some thing

Thanks and Regards

Kaushal

Hello Kaushal,

Tuesday, May 20, 2008, 7:12:45 PM, you wrote:

On Tue, May 20, 2008 at 5:24 PM, Denis F. Latypoff [email protected] wrote:

Thanks and Regards

Hi Denis

Thanks for the quick reply

I have this in the “nginx.conf” file and have restarted ngnix. Basically I
want to set it as a simple proxy server

    location / {
        root   /var/www/example/htdocs;
        index  index.html index.htm;
          error_page 404 = @proxy;
    }
      location @proxy {
          proxy_pass http://localhost:8000;
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For 

$proxy_add_x_forwarded_for;
}

Am i missing some thing

don’t forget to handle X-Real-IP header in your backend (mod_rpaf for
apache 2.x, or mod_realip for Apache 1.3)

Thanks and Regards

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs