What port should I use for my reverse proxy to Apache 2 from nginx?

Posted by meder on Server Fault See other posts from Server Fault or by meder
Published on 2010-06-14T17:07:40Z Indexed on 2010/06/14 17:13 UTC
Read the original article Hit count: 242

Filed under:
|
|
|
|

I have nginx setup as the defacto port 80. I want to setup django+mod_wsgi on Apache2. I'm worried if I leave Apache2 as 80 it will cause a conflict.

Is it better to avoid the headache and change Apache to a different port?

server {
    listen 80;
    server_name work.domain.org;

    access_log /www/work.domain.org/log/access.log;
    error_log /www/work.domain.org/log/error.log;

    location / {
        proxy_pass http://127.0.0.1:8080/;
        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;
        proxy_set_header        X-Magic-Header "secret";
        client_max_body_size       10m;
    }
}

© Server Fault or respective owner

Related posts about apache2

Related posts about nginx