diff --git a/homepage/views/articles/nginx_recipes_and_tips.pug b/homepage/views/articles/nginx_recipes_and_tips.pug index d9d8ce4..e8dfbf2 100644 --- a/homepage/views/articles/nginx_recipes_and_tips.pug +++ b/homepage/views/articles/nginx_recipes_and_tips.pug @@ -55,3 +55,9 @@ block article | location /assets/ { | alias $root/homepage/static/assets/; | } + p The very reason why I had to use variables is that #[code alias] doesn't work with relative paths. I wish #[code alias] could be relative to #[code root], but we are forced to look for workarounds. + p Update: Oh, I realised that you can declare variables in #[code http] block using #[code map] directive with #[code default] set to value you need. Funny, I've been using #[code map] to prevent LAN IPs from being logged all this time, heh. So, here's example: + pre + | map 1 $root { + | default /srv/http/dwelling; + | }