| gzip on; |
| gzip_disable "msie6"; |
| gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml; |
| |
| server { |
| |
| listen 80; |
| server_name testdrive.usecustos.org www.testdrive.usecustos.org; |
| return 301 https://testdrive.usecustos.org$request_uri; |
| } |
| |
| server { |
| listen 8080; |
| |
| root /usr/share/nginx/html; |
| |
| index index.html; |
| |
| location ~ ^/(css|js)/ { |
| # These assets include a digest in the filename, so they will never change |
| expires max; |
| } |
| |
| location ~* ^.+\.(html|htm)$ { |
| # Very short caching time to ensure changes are immediately recognized |
| expires 5m; |
| } |
| |
| location / { |
| try_files $uri $uri/ /index.html; |
| } |
| } |
| |
| server { |
| listen 443 ssl; |
| listen [::]:443 ssl; |
| |
| ssl_certificate /etc/nginx/fullchain.pem; |
| ssl_certificate_key /etc/nginx/privkey.pem; |
| |
| root /usr/share/nginx/html; |
| |
| index index.html; |
| |
| location ~ ^/(css|js)/ { |
| # These assets include a digest in the filename, so they will never change |
| expires max; |
| } |
| |
| location ~* ^.+\.(html|htm)$ { |
| # Very short caching time to ensure changes are immediately recognized |
| expires 5m; |
| } |
| |
| location / { |
| try_files $uri $uri/ /index.html; |
| } |
| } |