Commit 654bc7b188
Verified · cmc
Layout: unified · split
linux/nginx/etc/nginx/custom.d/sites/cleberg_net_static_locations.conf deleted −38
| @@ -1,38 +0,0 @@ | |||
| 1 | location /org/ { | ||
| 2 | internal; | ||
| 3 | alias /var/www/cleberg.net/org/; | ||
| 4 | default_type text/markdown; | ||
| 5 | add_header Content-Type "text/markdown; charset=utf-8" always; | ||
| 6 | add_header Vary "Accept" always; | ||
| 7 | } | ||
| 8 | |||
| 9 | location = / { | ||
| 10 | if ($http_accept ~* "text/markdown") { | ||
| 11 | rewrite ^/$ /org/index.org last; | ||
| 12 | } | ||
| 13 | |||
| 14 | add_header Vary "Accept" always; | ||
| 15 | try_files /index.html =404; | ||
| 16 | } | ||
| 17 | |||
| 18 | location / { | ||
| 19 | try_files $uri $uri/ =404; | ||
| 20 | } | ||
| 21 | |||
| 22 | location /blog/ { | ||
| 23 | rewrite ^/blog/((?!index)[^/]+)/(.*)$ /blog/$1.html permanent; | ||
| 24 | if ($http_accept ~* "text/markdown") { | ||
| 25 | rewrite ^/blog/([^/]+)\.html$ /org/blog/$1.org last; | ||
| 26 | } | ||
| 27 | } | ||
| 28 | |||
| 29 | location ~ ^/(.+)\.html$ { | ||
| 30 | if ($http_accept ~* "text/markdown") { | ||
| 31 | rewrite ^/(.+)\.html$ /org/$1.org last; | ||
| 32 | } | ||
| 33 | add_header Vary "Accept" always; | ||
| 34 | try_files $uri =404; | ||
| 35 | } | ||
| 36 | |||
| 37 | location /atom.xml { return 301 $scheme://$host/feed.xml; } | ||
| 38 | location /blog/salary-transparency.html { return 301 $scheme://$host/salary/; } | ||