cmc/dotfiles
Using GNU Stow to manage my dotfiles.
clone: git clone https://gitbay.org/cmc/dotfiles.git
920c5e5844e715237d0cfad1562fa0a0f85d29c9
verified · cmc
author: Christian Cleberg <hello@cleberg.net> · 2026-05-10T18:10:39Z
linux/nginx/etc/nginx/conf.d/cleberg.net.conf | 87 ++++++++++++--------------- 1 file changed, 39 insertions(+), 48 deletions(-) @@ -7,64 +7,55 @@ server { include custom.d/security/content-security-policy.conf; include custom.d/security/permissions-policy.conf; root /var/www/cleberg.net/; + include custom.d/redirects/blog.conf; port_in_redirect off; add_header Onion-Location "http://paske4urhs6nttrtlkuwa5cowum3fjkc6yv6kl4ncx3mjxcd77764nqd.onion$request_uri" always; - location /org/ { - internal; - alias /var/www/cleberg.net/org/; - default_type text/markdown; - add_header Content-Type "text/markdown; charset=utf-8" always; - add_header Vary "Accept" always; - } - - location = / { - if ($http_accept ~* "text/markdown") { - rewrite ^/$ /org/index.org last; - } + location /org/ { + internal; + alias /var/www/cleberg.net/org/; + default_type text/markdown; + add_header Content-Type "text/markdown; charset=utf-8" always; + add_header Vary "Accept" always; + } - add_header Vary "Accept" always; - try_files /index.html =404; - } + location = / { + if ($http_accept ~* "text/markdown") { + rewrite ^/$ /org/index.org last; + } - location / { - try_files $uri $uri/ =404; - } + add_header Vary "Accept" always; + try_files /index.html =404; + } - location /blog/ { - rewrite ^/blog/((?!index)[^/]+)/(.*)$ /blog/$1.html permanent; - if ($http_accept ~* "text/markdown") { - rewrite ^/blog/([^/]+)\.html$ /org/blog/$1.org last; - } - } + location / { + try_files $uri $uri/ =404; + } - location ~ ^/(.+)\.html$ { - if ($http_accept ~* "text/markdown") { - rewrite ^/(.+)\.html$ /org/$1.org last; - } - add_header Vary "Accept" always; - try_files $uri =404; - } + location /blog/ { + rewrite ^/blog/((?!index)[^/]+)/(.*)$ /blog/$1.html permanent; + if ($http_accept ~* "text/markdown") { + rewrite ^/blog/([^/]+)\.html$ /org/blog/$1.org last; + } + } - location /atom.xml { return 301 $scheme://$host/feed.xml; } - location /blog/salary-transparency.html { return 301 $scheme://$host/salary/; } - include custom.d/redirects/blog.conf; + location ~ ^/(.+)\.html$ { + if ($http_accept ~* "text/markdown") { + rewrite ^/(.+)\.html$ /org/$1.org last; + } + add_header Vary "Accept" always; + try_files $uri =404; + } } server { - listen 10012; - server_name hutch.cleberg.net; - include custom.d/basic.conf; - include custom.d/security/strict-transport-security.conf; - include custom.d/security/content-security-policy.conf; - include custom.d/security/permissions-policy.conf; - - location = /privacy.html { - return 301 https://zerolabs.sh/hutch/privacy-policy/; - } - - location = / { - return 301 https://zerolabs.sh/hutch/; - } + listen 10012; + server_name hutch.cleberg.net; + include custom.d/basic.conf; + include custom.d/security/strict-transport-security.conf; + include custom.d/security/content-security-policy.conf; + include custom.d/security/permissions-policy.conf; + location = /privacy.html { return 301 https://zerolabs.sh/hutch/privacy-policy/; } + location = / { return 301 https://zerolabs.sh/hutch/; } }