1

I'm developing with apache2 ( mpm-worker ) + mod_wsgi behind nginx which is silly since I have to sudo apache2ctl graceful for every update I make in anything but the template files.

My nginx conf is:

server {
        listen 80; 
        server_name site.org;

        access_log /www/site.org/log/access.log;
        error_log /www/site.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;
        }

}

Would it be a matter of just binding proxy_pass to 127.0.0.1:3000 if 3000 is the port used by the django server?

1 Answer 1

1

Ack, didn't realize it was this easy... I..

  • copied the server {} settings into another file
  • changed the port to 3001
  • changed the server name to dev.site.org
  • updated my host records in the DNS to point to my server IP
  • restarted nginx
  • did manage.py runserver 3001.

All is well :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.