1 #####################################
2 ### someone"s ansible provisioner ###
3 #####################################
4 # Part of: https://git.somenet.org/root/pub/somesible.git
5 # 2017-2024 by someone <someone@somenet.org>
8 vhost_custom_pre_server: |-
11 # image authentication
12 location ~ ^/images/ {
13 if (!-f $request_filename){ return 404; }
14 rewrite ^/images/(.*)$ /img_auth.php/$1?$args last;
18 location ^~ /images/deleted/ { return 404; }
19 location ^~ /maintenance/ { return 404; }
20 location ^~ /cache/ { return 404; }
21 location ^~ /logs/ { return 404; }
23 # cacheable static files
24 location ~ ^/(?!wiki\/).*\.(css|js|gif|jpg|jpeg|png|svg|wasm|ttf|woff|woff2|ico)$ {
26 add_header Cache-Control "public";
31 location ~ ^/wiki/ { rewrite ^/wiki/(.*)$ /index.php?title=$1&$args last; }
33 ## keep for legacy-reasons
34 location = /wiki { rewrite ^ /index.php permanent; }
35 # old. maybe delete in 2023-07?
36 location ^~ /wiki/index.php/ { rewrite ^/wiki/index.php/(.*)$ /wiki/$1 permanent; }
37 location ^~ /index.php/ { rewrite ^/index.php/(.*)$ /wiki/$1 permanent; }