Source for serving and static templating/compiling of https://joshstock.in.
{#} | Time | Hash | Subject | Author | # | (+) | (-) | GPG? |
---|---|---|---|---|---|---|---|---|
53 | 04 Jan 2020 15:48 | e821a92 | Modify nginx configuration | Josh Stockin | 1 | 3 | 7 | N |
1 | server { |
2 | listen 80; |
3 | listen [::]:80; |
4 | server_name localhost; |
5 | rewrite ^/(.*)/$ /$1 permanent; # truncate forward slash |
6 | root /var/www/html; |
7 | error_page 404 /error-404.html; location = /error-404.html {} |
8 | location = / { |
9 | index index.html; |
10 | } |
11 | location / { |
12 | try_files $uri $uri.html =404; |
13 | } |
14 | location ~* ^\/blog\/(.*)$ { |
15 | try_files /blog-$1.html =404; |
16 | } |
17 | } |
18 |