server { listen 80; listen [::]:80; listen 443 ssl; listen [::]:443 ssl; server_name localhost; ssl_certificate /etc/nginx/certs/ckan-local.crt; ssl_certificate_key /etc/nginx/certs/ckan-local.key; #access_log /var/log/nginx/host.access.log main; location / { proxy_pass http://ckan:5000/; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; #proxy_cache cache; proxy_cache_bypass $cookie_auth_tkt; proxy_no_cache $cookie_auth_tkt; proxy_cache_valid 30m; proxy_cache_key $host$scheme$proxy_host$request_uri; } error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }