37 lines
872 B
Text
37 lines
872 B
Text
# bestdadjokes.lol
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name bestdadjokes.lol;
|
|
|
|
root /srv/www/bestdadjokes;
|
|
index index.html;
|
|
|
|
error_page 404 /404.html;
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/javascript application/json application/xml image/svg+xml;
|
|
gzip_min_length 1024;
|
|
|
|
add_header X-Content-Type-Options nosniff always;
|
|
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
|
|
|
location ~* \.(css|js|svg|png|jpg|ico|woff2?)$ {
|
|
expires 7d;
|
|
add_header Cache-Control "public";
|
|
}
|
|
|
|
location = /favicon.ico { return 302 /static/favicon.svg; }
|
|
|
|
location / {
|
|
try_files $uri $uri/ $uri/index.html =404;
|
|
}
|
|
}
|
|
|
|
# www redirect
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name www.bestdadjokes.lol;
|
|
return 301 http://bestdadjokes.lol$request_uri;
|
|
}
|