50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
add_header Onion-Location http://$user.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
|
|
|
|
error_log /var/log/nginx/vern.cc-error.log info;
|
|
location @socket {
|
|
proxy_pass http://unix:/var/socks/$user.sock;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
}
|
|
|
|
root /vm/$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 unix:/var/socks/php.sock;
|
|
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;
|
|
}
|
|
|
|
autoindex on;
|
|
autoindex_exact_size off;
|
|
|
|
#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;
|
|
}
|
|
|