Source for serving and static templating/compiling of https://joshstock.in.
{#} | Time | Hash | Subject | Author | # | (+) | (-) | GPG? |
---|---|---|---|---|---|---|---|---|
163 | 21 Jan 2023 10:10 | 29e63dd | Point 404 error pages to correct file location | Josh Stockin | 1 | 3 | 1 | G |
1 | server { |
2 | listen 443 ssl http2; |
3 | listen [::]:443 ssl http2; |
4 | server_name start.joshstock.in; |
5 | rewrite ^/(.*)/$ /$1 permanent; # truncate forward slash |
6 | root /var/www/startpage; |
7 | error_page 404 /error/404.html; location = /error/404.html { |
8 | root /var/www/josh/static; |
9 | } |
10 | location = / { |
11 | index index.html; |
12 | } |
13 | location / { |
14 | try_files $uri $uri.html =404; |
15 | } |
16 | } |
17 |