-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
108 lines (101 loc) · 6.26 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
# Error 404
error_page 404 /404.html;
# General headers applied to all routes
add_header X-Frame-Options "DENY";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
add_header Referrer-Policy "no-referrer-when-downgrade";
add_header Permissions-Policy "interest-cohort=()";
# Special handling for /sw.js
location = /sw.js {
add_header cache-control "max-age=0, no-cache, no-store, must-revalidate";
}
# Redirect domain aliases to primary domain
if ($host ~* "^www.imhoff.name$") {
return 301 https://www.stefanimhoff.de$request_uri;
}
if ($host ~* "^stefan.imhoff.name$") {
return 301 https://www.stefanimhoff.de$request_uri;
}
if ($host ~* "^imhoff.name$") {
return 301 https://www.stefanimhoff.de$request_uri;
}
# Redirects
rewrite ^/feed-raindrop.xml$ https://bg.raindrop.io/rss/public/25041238 permanent;
rewrite ^/index.xml$ /rss.xml permanent;
rewrite ^/templates-for-ia-writer$ /template-ia-writer-nanzan permanent;
rewrite ^/notiz/das-koi-design-inspiration-und-idee$ /koi-design permanent;
rewrite ^/notiz/kostenlose-vektorkarten-mit-openstreetmap$ /openstreetmap permanent;
rewrite ^/notiz/kostenlose-vektorkarten-openstreetmap$ /openstreetmap permanent;
rewrite ^/notiz/domains-extern-hosten$ /domain-hosting permanent;
rewrite ^/notiz/versionskontrolle-mit-git$ /git permanent;
rewrite ^/versionskontrolle-mit-git$ /git permanent;
rewrite ^/notiz/eineinhalb-jahre-gtd-eine-billanz$ /gtd permanent;
rewrite ^/notiz/traditionelle-japanische-farben-photoshop-illustrator$ /japanese-colors permanent;
rewrite ^/notiz/gtd-mit-omnifocus-oder-things$ /gtd permanent;
rewrite ^/notiz/einstieg-in-git-als-versionskontrollsystem$ /git permanent;
rewrite ^/notiz/gitweb-theme-github-stil$ /gitweb-theme permanent;
rewrite ^/notiz/home-atemberaubende-erde-dokumentation-yann-arthus-bertrand$ /home-documentary permanent;
rewrite ^/notiz/git-praesentation$ /git permanent;
rewrite ^/notiz/buchtipp-rework-37signals$ /rework permanent;
rewrite ^/notiz/webstandards-magazin-django$ /webstandards-magazin-django permanent;
rewrite ^/notiz/vim$ /vim permanent;
rewrite ^/notiz/buchtipp-decodeunicode$ /decodeunicode permanent;
rewrite ^/2007/domains-extern-hosten/$ /domain-hosting permanent;
rewrite ^/2007/koi-design/$ /koi-design/ permanent;
rewrite ^/2007/eineinhalb-jahre-gtd-eine-billanz/$ /gtd/ permanent;
rewrite ^/2007/traditionelle-japanische-farben-photoshop-illustrator/$ /japanese-colors/ permanent;
rewrite ^/2008/kostenlose-vektorkarten-openstreetmap/$ /openstreetmap/ permanent;
rewrite ^/2009/einstieg-in-git-als-versionskontrollsystem/$ /git/ permanent;
rewrite ^/2009/gitweb-theme-github-stil/$ /gitweb-theme/ permanent;
rewrite ^/2009/home-atemberaubende-erde-dokumentation-yann-arthus-bertrand/$ /home-documentary/ permanent;
rewrite ^/2010/buchtipp-rework-37signals/$ /rework/ permanent;
rewrite ^/2010/webstandards-magazin-django/$ /webstandards-magazine-django/ permanent;
rewrite ^/2010/vim/$ /vim/ permanent;
rewrite ^/2011/buchtipp-decodeunicode/$ /decodeunicode/ permanent;
rewrite ^/2014/gestaltung-neues-logo/$ /logo-design/ permanent;
rewrite ^/2014/die-typographie-meiner-website/$ /website-typography/ permanent;
rewrite ^/2014/john-seymour-buecher-selbstversorgung/$ /john-seymour-books/ permanent;
rewrite ^/2014/gulp-tutorial-1-intro-setup/$ /gulp-tutorial-1-intro-setup/ permanent;
rewrite ^/2014/gulp-tutorial-2-development-server-browsersync-configuration/$ /gulp-tutorial-2-development-server-browsersync-configuration/ permanent;
rewrite ^/2014/gulp-tutorial-3-build-clean-jekyll/$ /gulp-tutorial-3-build-clean-jekyll/ permanent;
rewrite ^/2014/gulp-tutorial-4-css-generation-sass/$ /gulp-tutorial-4-css-generation-sass/ permanent;
rewrite ^/2014/gulp-tutorial-5-javascripts-browserify/$ /gulp-tutorial-5-javascripts-browserify/ permanent;
rewrite ^/2014/gulp-tutorial-6-images-vector-fonts/$ /gulp-tutorial-6-images-vector-fonts/ permanent;
rewrite ^/2014/gulp-tutorial-7-base64/$ /gulp-tutorial-7-base64/ permanent;
rewrite ^/2014/gulp-tutorial-8-watch/$ /gulp-tutorial-8-watch/ permanent;
rewrite ^/2014/gulp-tutorial-9-linting-scss-and-javascript/$ /gulp-tutorial-9-linting-scss-and-javascript/ permanent;
rewrite ^/2014/gulp-tutorial-10-generating-sprites/$ /gulp-tutorial-10-generating-sprites/ permanent;
rewrite ^/2014/gulp-tutorial-11-production-build-server-and-jekyll/$ /gulp-tutorial-11-production-build-server-and-jekyll/ permanent;
rewrite ^/2014/gulp-tutorial-12-optimize-css-javascript-images-and-html/$ /gulp-tutorial-12-optimize-css-javascript-images-and-html/ permanent;
rewrite ^/2014/gulp-tutorial-13-revisioning/$ /gulp-tutorial-13-revisioning/ permanent;
rewrite ^/2014/gulp-tutorial-14-deploying-the-website/$ /gulp-tutorial-14-deploying-the-website/ permanent;
rewrite ^/2014/gulp-tutorial-15-performance-improvements-webp-gzip/$ /gulp-tutorial-15-performance-improvements-webp-gzip/ permanent;
rewrite ^/2015/responsive-relaunch-of-my-martial-arts-website/$ /responsive-relaunch-martial-arts-website/ permanent;
rewrite ^/2015/getting-started-with-body-weight-training/$ /calisthenics/ permanent;
rewrite ^/2015/motivational-video/$ /motivational-video/ permanent;
rewrite ^/2015/human-film-yann-arthus-bertrand/$ /human-documentary/ permanent;
rewrite ^/2015/gulp-tutorial-16-postcss/$ /gulp-tutorial-16-postcss/ permanent;
rewrite ^/2016/japanese-netflix-tv-show-atelier-underwear/$ /japanese-netflix-tv-show-underwear/ permanent;
rewrite ^/2016/hugo-jekyll-migration/$ /jekyll-hugo-migration/ permanent;
rewrite ^/2016/speed-up-videos/$ /speed-up-videos/ permanent;
rewrite ^/2017/pursuit-of-minimalism/$ /minimalism/ permanent;
rewrite ^/2017/minimalism/$ /minimalism/ permanent;
rewrite ^/2017/i-wrote-a-book-in-gitbook/$ /gitbook/ permanent;
rewrite ^/2017/migration-hugo-css-grids-service-worker/$ /website-relaunch-css-grid-layout/ permanent;
rewrite ^/2017/self-defence-age-of-attention/$ /attention/ permanent;
rewrite ^/information/impressum$ /imprint permanent;
rewrite ^/notizbuch$ /journal permanent;
rewrite ^/archiv$ /journal permanent;
rewrite ^/on-learning-poems$ /learning-poems permanent;
# Handling missing pages
try_files $uri $uri/ /index.html;
}