1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00
iiab/roles/nginx/templates/iiab.conf.j2

61 lines
1.7 KiB
Text
Raw Normal View History

2019-12-17 15:25:22 +00:00
location / {
rewrite ^/$ $1{{ iiab_home_url }};
2019-12-17 15:25:22 +00:00
}
location /usb {
2019-12-17 15:25:22 +00:00
alias /library/www/html/local_content/;
fancyindex on; # autoindex on;
add_before_body /usb/upload/button.html;
}
location ~ ^/usb/upload/(.*)\.php$ {
alias /library/www/html/local_content/upload/$1.php;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
fastcgi_pass php;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include fastcgi_params;
}
location /local_content/ {
fancyindex on; # autoindex on;
add_before_body /usb/upload/button.html;
}
2019-12-09 17:10:02 +00:00
location /info {
fancyindex on; # Directory listing for http://box/info/admin-console/
fancyindex_exact_size off; # Output human-readable file sizes.
}
2019-12-09 17:10:02 +00:00
location /modules/ {
fancyindex on; # Enable fancy indexes.
fancyindex_exact_size off; # Output human-readable file sizes.
fancyindex_ignore index.htmlf rachel-index.php;
}
location /js-menu/ {
fancyindex on; # autoindex on;
location /js-menu/menu-files/js/ {
fancyindex off; # autoindex off;
}
location /js-menu/menu-files/services/ {
fancyindex off; # autoindex off;
}
}
2020-07-15 20:05:19 +00:00
location /software/ {
fancyindex on; # Enable fancy indexes.
fancyindex_exact_size off; # Output human-readable file sizes.
location ~* \.(apk)$ {
2020-07-15 20:05:19 +00:00
add_header Content-Type application/vnd.android.package-archive;
}
2020-07-15 20:05:19 +00:00
location ~* \.(zim)$ {
2020-07-15 20:05:19 +00:00
add_header Content-Type application/zip;
}
2020-07-15 20:05:19 +00:00
}