Compare commits

...

3 Commits

Author SHA1 Message Date
Jonas Zeunert
e33a6bb9a3 add mod file for nginx 2024-04-24 01:07:52 +02:00
Jonas Zeunert
3b253fb978 Merge branch 'main' of https://gitlab.rhetenor.de/rhetenor/awesm 2024-04-24 01:06:22 +02:00
Jonas Zeunert
b2e9e12ebb Change nginx conf files 2024-04-24 01:06:03 +02:00
2 changed files with 27 additions and 14 deletions

21
dotfiles/nginx.conf Normal file → Executable file
View File

@@ -1,19 +1,10 @@
# Include before server
#map $term $root {
# 1 /var/www/awesm/terminal;
# default /var/www/awesm/html;
#}
#
#map $http_user_agent $autoindex_type {
# "~*curl*" jsonp;
# default html;
#}
#sub_path_only rewrite ^/$ / permanent;
location /lists/idx {
alias $root/;
#sub_path_only rewrite ^/$ / permanentm
location = /lists o
alias $root;
index false;
autoindex on;
autoindex_localtime off;
autoindex_format jsonp;
}
@@ -29,6 +20,7 @@ location /style {
}
location = / {
add_header x-loc "/ exact";
root $root;
try_files /index /index.html;
@@ -36,6 +28,7 @@ location = / {
#location ~* ^/lists {
location / {
add_header x-loc "/ wild";
root $root;
try_files $uri $uri.html /redirect?q=$uri;

20
dotfiles/nginx_mod.conf Executable file
View File

@@ -0,0 +1,20 @@
map $http_user_agent $term {
"~*curl*" 1;
"~*wget*" 1;
default 0;
}
map $term $pretty {
0 "pretty";
default "";
}
map $term $root {
1 /var/www/awesm/terminal;
default /var/www/awesm/html;
}
map $http_user_agent $autoindex_type {
"~*curl*" jsonp;
default html;
}