Skip to content

Instantly share code, notes, and snippets.

@tyrm
Created June 4, 2020 02:15
Show Gist options
  • Save tyrm/6e0c95ccd294ae432405261c5ba6b7a4 to your computer and use it in GitHub Desktop.
Save tyrm/6e0c95ccd294ae432405261c5ba6b7a4 to your computer and use it in GitHub Desktop.
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name cdn.example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
access_log /var/log/nginx/cdn-access.log main;
error_log /var/log/nginx/cdn-error.log;
ignore_invalid_headers off;
client_max_body_size 0;
proxy_buffering off;
root /data/public;
location / {
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name minio.example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
access_log /var/log/nginx/minio-access.log main;
error_log /var/log/nginx/minio-error.log;
ignore_invalid_headers off;
client_max_body_size 0;
proxy_buffering off;
location / {
proxy_http_version 1.1;
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 https;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:9000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment