Skip to content
Snippets Groups Projects
Commit fd196e5d authored by MichiK's avatar MichiK
Browse files

Really fix nging config and unify config notation

parent e1a6e064
No related branches found
No related tags found
No related merge requests found
......@@ -17,21 +17,27 @@ nginx_https_sites:
- name: "c3heaven.de"
locations:
- location: "/"
config: "root {{ website_deployment_path }};"
- location: "/img/"
config: "add_header Access-Control-Allow-Origin *;"
- location: "~ /(.*)_galf_tseuq.html$"
config: "add_header Access-Control-Allow-Origin *;"
config: |-
root {{ website_deployment_path }};
location /img/ {
add_header Access-Control-Allow-Origin *;
}
location ~ /(.*)_galf_tseuq.html$ {
add_header Access-Control-Allow-Origin *;
}
- location: "~ /wiki(.*)$"
config: "return 301 https://wiki.c3heaven.de$1?$args;"
config: |-
return 301 https://wiki.c3heaven.de$1?$args;
- location: "~ /kanboard(.*)$"
config: "return 301 https://kanboard.c3heaven.de$1?$args;"
config: |-
return 301 https://kanboard.c3heaven.de$1?$args;
- location: "/guide"
config: |-
alias {{ angelguide_deployment_path }};
add_header Access-Control-Allow-Origin *;
- location: "/angelguide.pdf"
config: "rewrite .* /guide/angelguide_$lang.pdf;"
config: |-
rewrite .* /guide/angelguide_$lang.pdf;
- location: "/favicon.ico"
config: |-
access_log off;
......@@ -59,7 +65,8 @@ nginx_https_sites:
- "index index.php;"
locations:
- location: "/"
config: "try_files $uri $uri/ /index.php$is_args$args;"
config: |-
try_files $uri $uri/ /index.php$is_args$args;
- location: '~ \.php$'
config: |-
try_files $uri =404;
......@@ -69,9 +76,11 @@ nginx_https_sites:
fastcgi_index index.php;
include fastcgi_params;
- location: '~* ^.+\.(log|sqlite)$'
config: "return 404;"
config: |-
return 404;
- location: '~ /\.ht'
config: "return 404;"
config: |-
return 404;
- location: '~* ^.+\.(ico|jpg|gif|png|css|js|svg|eot|ttf|woff|woff2|otf)$'
config: |-
log_not_found off;
......@@ -90,9 +99,11 @@ nginx_https_sites:
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
- location: "/images/mailman"
config: "alias /usr/share/images/mailman;"
config: |-
alias /usr/share/images/mailman;
- location: "= /"
config: "return 301 https://lists.c3heaven.de/cgi-bin/mailman/listinfo/;"
config: |-
return 301 https://lists.c3heaven.de/cgi-bin/mailman/listinfo/;
- name: "md.c3heaven.de"
locations:
- location: "/"
......@@ -133,7 +144,8 @@ nginx_https_sites:
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port 443;
- location: "= /"
config: "return 301 https://sso.c3heaven.de/auth/realms/master/account;"
config: |-
return 301 https://sso.c3heaven.de/auth/realms/master/account;
- name: "wiki.c3heaven.de"
options:
- "client_max_body_size 100M;"
......@@ -142,13 +154,17 @@ nginx_https_sites:
- "index doku.php;"
locations:
- location: "~ /(conf/|bin/|inc/|install.php)"
config: "deny all;"
config: |-
deny all;
- location: "~ ^/data/"
config: "internal;"
config: |-
internal;
- location: '~ ^/lib.*\.(js|css|gif|png|ico|jpg|jpeg)$'
config: "expires 365d;"
config: |-
expires 365d;
- location: "/"
config: "try_files $uri $uri/ @dokuwiki;"
config: |-
try_files $uri $uri/ @dokuwiki;
- location: "@dokuwiki"
config: |-
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment