Skip to content

Instantly share code, notes, and snippets.

@andmos
Created April 10, 2020 11:17
Show Gist options
  • Save andmos/76fed99e90c2370eab3abcfd316d604e to your computer and use it in GitHub Desktop.
Save andmos/76fed99e90c2370eab3abcfd316d604e to your computer and use it in GitHub Desktop.
events {}
http {
server {
listen 5000 ssl;
server_name localhost;
ssl_certificate /usr/share/certs/localhost+2.pem;
ssl_certificate_key /usr/share/certs/localhost+2-key.pem;
ssl_protocols TLSv1.2;
charset UTF-8;
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_set_header X-Forwarded-Host $server_name;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
server_tokens off;
client_max_body_size 100M;
location / {
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://myservice:80/;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment