Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docker/nginx.prod.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
user nginx;
worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
Expand All @@ -8,8 +9,10 @@ events {

http {
server {
listen 80;

listen 80 deferred;
client_max_body_size 128M;
server_name cncnet.org mapdb2.cncnet.org;

# Serve static files: js, static images, etc.
location /static/ {
alias /usr/share/nginx/html/static/; # The nginx container's mounted volume.
Expand All @@ -25,10 +28,11 @@ http {
# Proxy requests to the Django app running in gunicorn
location / {
proxy_pass http://django:8000; # The Django app is exposed on the `django` container on port 8000
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
}
}
}