Index

joshstock.in / 4024ec7

Source for serving and static templating/compiling of https://joshstock.in.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
3802 Jan 2020 16:4207297adStreamline nginx configuration updatesJosh Stockin1190N

Blob @ joshstock.in / nginx / test / root.conf

text/plain379 bytesdownload raw
1server {
2 listen 80;
3 listen [::]:80;
4 server_name localhost;
5 rewrite ^/(.*)/$ /$1 permanent; # truncate forward slash
6 root /var/www/html;
7 index index.html;
8 error_page 404 /error-404.html;
9 rewrite_log on;
10 location / {
11 try_files $uri $uri/ $uri.html =404;
12 }
13 location /static {
14 try_files $uri =404;
15 }
16 location ~* ^\/blog\/(.*)$ {
17 try_files /blog-$1.html =404;
18 }
19}
20