events { worker_connections 768; } pid /tmp/nginx.pid; error_log /tmp/error; http { include mime.types; default_type application/octet-stream; ssl_dhparam dhparams.pem; ## # Logging Settings ## access_log /tmp/access-main; #passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini; #passenger_ruby /home/debshots/.rbenv/versions/2.3.1/bin/ruby; ## # Gzip Settings ## gzip on; server { listen *:3001 ssl; ssl_certificate screenshots.debian.net.crt; ssl_certificate_key screenshots.debian.net.key; ssl_client_certificate debsso.crt; ssl_crl debsso.crl; ssl_verify_client optional; ssl_verify_depth 1; proxy_set_header X-Debian-SSO-DN $ssl_client_s_dn; root ../public; server_name _; access_log /tmp/access-front; # Tell the backend if the protocol used was HTTPS. Otherwise you get an infinite # redirection loop because the backend assumes that HTTP was spoken behind the # proxy. proxy_set_header X-Forwarded-Proto $scheme; # Pass on the actual HTTP_HOST ("Host:" header) so that Rails can build proper absolute URLs proxy_set_header Host $host:$server_port; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; gzip_proxied any; location / { proxy_pass http://127.0.0.1:3000/; } } }