Skip to content

Instantly share code, notes, and snippets.

@cspanring
Forked from mbertrand/nginx.conf
Created August 15, 2013 19:24
Show Gist options
  • Save cspanring/6243929 to your computer and use it in GitHub Desktop.
Save cspanring/6243929 to your computer and use it in GitHub Desktop.
GeoNode nginx configuration (with supervisor)
server {
listen 80;
server_name mydomain.edu localhost;
location /static {
alias /www/geonode/src/GeoNodePy/geonode/static_root;
}
#GEOSERVER
location /geoserver {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080;
proxy_redirect default;
proxy_pass_header Set-Cookie;
}
#GEONETWORK
location /geonetwork {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080;
proxy_redirect default;
proxy_pass_header Set-Cookie;
}
#GEONODE
location / {
proxy_pass http://localhost:8801;
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_read_timeout 60;
proxy_send_timeout 60;
}
}
[program:gunicorn]
command=/www/geonode/bin/gunicorn_django -b localhost:8801 -w 8 -t 60 geonode.settings
directory=/www/geonode
user=www-data
autostart=true
autorestart=true
stdout_logfile=/www/geonode/logs/gunicorn.log
redirect_stderr=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment