This is an old revision of the document!


Vue

server {
    listen 443 http2 ssl;
 
    server_name kalen.pw;
    access_log /var/log/nginx/access-kalen.pw.log;
 
    root /web/kalen.pw;
    index index.html;
    ssl_certificate /etc/letsencrypt/live/kalen.pw-0001/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/kalen.pw-0001/privkey.pem; # managed by Certbot
 
    location /_assets {
        expires 365d;
        root /web/kalen.pw;
    }
    location /img {
        expires 365d;
        root /web/kalen.pw;
    }
 
    location / {
        if (!-e $request_filename) {
            rewrite ^ / permanent;
        }
    }
}
 
server {
    listen 443 ssl;
    server_name www.kalen.pw;
    return 301 $scheme://kalen.pw$request_uri;
}
 
server {
    if ($host = www.kalen.pw) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
 
 
    if ($host = kalen.pw) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
 
 
    if ($host = www.kalenpw.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
 
 
    if ($host = kalenpw.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
 
 
    listen 80;
 
    server_name www.kalen.pw kalen.pw;
    return 404; # managed by Certbot
}