Skip to content

Instantly share code, notes, and snippets.

@zew13
Created January 12, 2020 04:05
Show Gist options
  • Select an option

  • Save zew13/f2ced4229415391ed331a86c61868ebe to your computer and use it in GitHub Desktop.

Select an option

Save zew13/f2ced4229415391ed331a86c61868ebe to your computer and use it in GitHub Desktop.
server {
listen 443 ssl http2;
server_name r5.pub;
location ~ ^/(?!(.+\.)) {
rewrite ^/(.*) /index.html last;
}
location = /index.html {
expires 60s;
}
expires 9999999s;
index index.html;
root /var/www/r5.pub;
ssl_certificate /root/.acme.sh/r5.pub/fullchain.cer;
ssl_certificate_key /root/.acme.sh/r5.pub/r5.pub.key;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
error_log /var/log/nginx/r5.pub.error.log;
access_log /var/log/nginx/r5.pub.access.log main;
}
server {
listen 443 ssl http2;
server_name cdn.r5.pub;
expires 9999999s;
root /var/www/r5.pub;
ssl_certificate /root/.acme.sh/r5.pub/fullchain.cer;
ssl_certificate_key /root/.acme.sh/r5.pub/r5.pub.key;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
error_log /var/log/nginx/cdn.r5.pub.error.log;
access_log /var/log/nginx/cdn.r5.pub.access.log main;
}
server {
listen 80;
server_name *.r5.pub r5.pub;
return 301 https://r5.pub$request_uri;
}
server {
listen 443 ssl;
server_name *.r5.pub;
return 301 https://www.r5.pub$request_uri;
ssl_certificate /root/.acme.sh/r5.pub/fullchain.cer;
ssl_certificate_key /root/.acme.sh/r5.pub/r5.pub.key;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment