nginx-configs/common/usersites.conf

46 lines
1.0 KiB
Plaintext

add_header Onion-Location http://$user.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
error_log /var/log/nginx/vern.cc-error.log info;
root /sshfs/home/$user/public_html;
index index.html index.php index.cgi index.py index.sh index.pl index.lua;
ssi on;
location @extensionless-php {
rewrite ^(.*)$ $1.php last;
}
location ~ \.php$ {
fastcgi_pass 192.168.122.30:9000;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include /etc/nginx/snippets/fastcgi.conf;
}
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;
include snippets/fastcgi.conf;
}
autoindex on;
autoindex_exact_size off;
charset utf-8;
#location / {
#try_files @socket =404;
# try_files @socket $uri $uri/index.html $uri.html $uri/ @extensionless-php;
# if (!-d /vm/$user/public_html) {
# return 307 https://vern.cc/;
# }
# autoindex on;
#}
location /media {
autoindex on;
}
if ($badagent) {
return 403;
}