Mirror fancyindex

This commit is contained in:
root 2022-07-28 00:13:05 -04:00
parent 9371637638
commit 2b25af28d6
3 changed files with 14 additions and 29 deletions

View File

@ -6,11 +6,14 @@ location / {
add_before_body /nav.html;
fancyindex on;
fancyindex_exact_size off;
fancyindex_default_sort date;
fancyindex_default_sort date_desc;
fancyindex_time_format "%a, %e %B %Y %I:%M:%S %p";
subs_filter ".*<style type=\"text/css\">.*</style>" "";
}
location /gnu {
add_before_body /gnu.html;
fancyindex on;
fancyindex_exact_size off;
fancyindex_default_sort date;
fancyindex_default_sort date_desc;
fancyindex_time_format "%a, %e %B %Y %I:%M:%S %p";
}

View File

@ -48,32 +48,5 @@ location /media/ {
## users
location ~ ^/(~|u/)(?<user>[\w-]+)(?<user_uri>/.*)?$ {
if (!-d /sshfs/home/$user/public_html) {
return 307 https://vern.cc/;
}
# subs_filter (<[^>]*\s(href|src)=["']?/) $1u/$user;
autoindex on;
autoindex_exact_size off;
ssi on;
error_log /var/log/nginx/vern.cc-error.log crit;
alias /sshfs/home/$user/public_html;
index index.html index.php index.cgi index.py index.sh index.pl index.lua;
rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
rewrite ^/(.*)/$ /$1 permanent;
try_files $uri $uri/index.html $uri.html $uri/ =404;
location ~ \.php$ {
fastcgi_pass 192.168.122.30:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
}
location ~ (\.cgi|\.py|\.sh|\.pl|\.lua|\/cgi-bin)$ {
gzip off;
fastcgi_pass 192.168.122.30:9001;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
}
}

View File

@ -26,6 +26,15 @@ server {
include common/mastodon.conf;
}
server {
listen 80;
listen [::]:80;
server_name fedi.vern.cc;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;