Created
March 18, 2017 16:30
-
-
Save kazzkiq/06e8c2e3f5efde46ce9306492c4be829 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PWA (Application) | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name app.cryptoholder.com www.app.cryptoholder.com; | |
return 301 https://app.cryptoholder.com$request_uri; | |
} | |
server { | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
include snippets/ssl-cryptoholder.com.conf; | |
include snippets/ssl-params.conf; | |
root /var/www/cryptoholder.com/html/cryptoholder-pwa/public; | |
index index.html; | |
server_name app.cryptoholder.com; | |
gzip on; | |
gzip_comp_level 6; | |
gzip_vary on; | |
gzip_min_length 1000; | |
gzip_proxied any; | |
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml; | |
gzip_buffers 16 8k; | |
server_tokens off; | |
location / { | |
try_files $uri $uri/ /index.html; | |
# cache.appcache, your document html and data | |
location ~* \.(manifest|appcache|html?|xml|json)$ { | |
expires -1; | |
} | |
# Media: images, icons, video, audio, HTC | |
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { | |
expires 1M; | |
access_log off; | |
add_header Cache-Control "public"; | |
} | |
# CSS and Javascript | |
location ~* \.(?:css|js)$ { | |
expires 1y; | |
access_log off; | |
add_header Cache-Control "public"; | |
} | |
# Disable Service Worker Cache | |
location ~* sw\.js { | |
expires -1; | |
} | |
} | |
# enabling access to this path for SSL (LetsEncrypt) | |
# from tutorial from DigitalOcean | |
location ~ /.well-known { | |
allow all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment