Skip to content

Instantly share code, notes, and snippets.

@Nolski
Last active August 29, 2015 14:12
Show Gist options
  • Save Nolski/c96c870b426dce2bd7c8 to your computer and use it in GitHub Desktop.
Save Nolski/c96c870b426dce2bd7c8 to your computer and use it in GitHub Desktop.
nolski.rocks.conf
server {
listen 80;
server_name nolski.rocks;
# Removing server headers
proxy_pass_header Server;
server_tokens off;
return 301 https://nolski.rocks$request_uri;
}
server {
listen 443 ssl;
server_name nolski.rocks;
# Removing server headers
proxy_pass_header Server;
server_tokens off;
ssl_certificate /etc/nginx/certs/nolski_rocks.crt;
ssl_certificate_key /etc/nginx/certs/nolski_rocks.key;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_hide_header X-powered-by;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment