Created
May 15, 2016 13:14
-
-
Save thesabbir/39045d9d8fbf8446c7ed733c2a130062 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
server { | |
listen 80; | |
server_name localhost; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
root /srv/build; | |
index index.html index.htm; | |
#SSL | |
server_name localhost; | |
ssl_certificate /etc/letsencrypt/live/localhost/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/localhost/privkey.pem; | |
#GZIP | |
gzip on; | |
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; | |
gzip_min_length 1000; | |
location / { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
try_files $uri $uri/ =404; | |
} | |
location ^~ /.well-known { | |
allow all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment