2022-07-25 10:55:46 +00:00
|
|
|
add_header Onion-Location http://vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
|
2022-09-29 02:25:07 +00:00
|
|
|
root /var/www/website;
|
2022-07-25 10:55:46 +00:00
|
|
|
index index.html;
|
|
|
|
ssi on;
|
2022-09-30 10:58:11 +00:00
|
|
|
gzip on;
|
|
|
|
gzip_disable "msie6";
|
|
|
|
gzip_vary on;
|
|
|
|
gzip_proxied any;
|
|
|
|
gzip_min_length 1024;
|
|
|
|
gzip_comp_level 6;
|
|
|
|
gzip_buffers 16 8k;
|
|
|
|
gzip_http_version 1.1;
|
|
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
|
|
|
|
# Brotli Settings
|
|
|
|
brotli on;
|
|
|
|
brotli_comp_level 4;
|
|
|
|
brotli_buffers 32 8k;
|
|
|
|
brotli_min_length 100;
|
|
|
|
brotli_static on;
|
|
|
|
brotli_types image/jpeg image/bmp image/svg+xml text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon;
|
2022-07-25 10:55:46 +00:00
|
|
|
|
|
|
|
location / {
|
2022-08-19 10:39:17 +00:00
|
|
|
# rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
|
|
|
|
# rewrite ^/(.*)/$ /$1 permanent;
|
2022-07-26 11:37:37 +00:00
|
|
|
try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
|
2022-07-25 10:55:46 +00:00
|
|
|
|
|
|
|
error_page 403 /errors/403;
|
|
|
|
error_page 404 /errors/404;
|
|
|
|
error_page 503 /errors/503;
|
|
|
|
}
|
|
|
|
|
2022-09-30 07:36:16 +00:00
|
|
|
location /dom-tor {
|
|
|
|
return 200 "vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion";
|
|
|
|
}
|
|
|
|
|
|
|
|
location /dom-i2p {
|
|
|
|
return 200 "verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p";
|
|
|
|
}
|
|
|
|
|
2022-07-25 10:55:46 +00:00
|
|
|
location /errors/.* {
|
|
|
|
internal;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ \.php$ {
|
|
|
|
try_files $uri =404;
|
|
|
|
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
|
|
|
|
include fastcgi.conf;
|
|
|
|
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
|
|
|
|
fastcgi_buffers 16 16k;
|
|
|
|
fastcgi_buffer_size 32k;
|
|
|
|
}
|
|
|
|
|
|
|
|
location @extensionless-php {
|
|
|
|
rewrite ^(.*)$ $1.php last;
|
|
|
|
}
|
|
|
|
|
2022-08-07 00:52:49 +00:00
|
|
|
location ~ ^(/media/|/canaries/)$ {
|
|
|
|
#autoindex on;
|
|
|
|
fancyindex on;
|
|
|
|
fancyindex_exact_size off;
|
|
|
|
fancyindex_default_sort date_desc;
|
|
|
|
fancyindex_time_format "%a, %e %B %Y %I:%M:%S %p";
|
2022-07-25 10:55:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
## users
|
|
|
|
location ~ ^/(~|u/)(?<user>[\w-]+)(?<user_uri>/.*)?$ {
|
2022-07-30 18:19:52 +00:00
|
|
|
error_log /var/log/nginx/vern.cc-error.log crit;
|
|
|
|
root /sshfs/home/$user/public_html;
|
|
|
|
index index.html index.php index.cgi index.py index.sh index.pl index.lua;
|
|
|
|
ssi on;
|
2022-07-26 11:37:37 +00:00
|
|
|
|
2022-08-19 10:39:17 +00:00
|
|
|
# rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
|
|
|
|
# rewrite ^/(.*)/$ /$1 permanent;
|
2022-07-30 18:19:52 +00:00
|
|
|
try_files $user_uri $user_uri/index.html $user_uri.html $user_uri/ @extensionless-php;
|
|
|
|
autoindex on;
|
|
|
|
autoindex_exact_size off;
|
|
|
|
|
2022-07-31 00:20:43 +00:00
|
|
|
subs_filter_types text/html text/css text/xml;
|
2022-08-17 08:02:16 +00:00
|
|
|
subs_filter (((file|virtual|src|href)=|url\()["']?)/([^/]) $1/~$user/$4 r;
|
2022-07-31 00:20:43 +00:00
|
|
|
|
2022-07-30 18:19:52 +00:00
|
|
|
location ~ \.php$ {
|
|
|
|
fastcgi_pass 192.168.122.30:9000;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
|
|
}
|
2022-07-31 00:20:43 +00:00
|
|
|
|
2022-07-30 18:19:52 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
#error_page 404 /404.html;
|
|
|
|
|
|
|
|
|
|
|
|
if (!-d /sshfs/home/$user/public_html) {
|
|
|
|
return 307 https://vern.cc/;
|
|
|
|
}
|
2022-07-25 10:55:46 +00:00
|
|
|
}
|
2022-08-06 18:36:59 +00:00
|
|
|
|
2022-08-17 08:02:16 +00:00
|
|
|
location ~ ^/(wp-(admin|login\.php|config\.php)|\.env)$ {
|
2022-08-17 08:24:26 +00:00
|
|
|
return 301 http://fsn.icmp.hetzner.com/10GB.bin;
|
2022-08-17 08:02:16 +00:00
|
|
|
}
|
2022-09-15 12:20:27 +00:00
|
|
|
location /.git {
|
|
|
|
return 301 http://fsn.icmp.hetzner.com/10GB.bin;
|
|
|
|
}
|
|
|
|
location /blog/.git {
|
|
|
|
return 301 http://fsn.icmp.hetzner.com/10GB.bin;
|
2022-09-09 14:41:08 +00:00
|
|
|
}
|
2022-09-16 10:27:45 +00:00
|
|
|
|
|
|
|
location /sitemap {
|
2022-09-17 16:19:10 +00:00
|
|
|
root /sshfs/websiteupdate/website;
|
2022-09-16 10:27:45 +00:00
|
|
|
try_files $uri $uri.html $uri/ @extensionless-php;
|
|
|
|
index off;
|
|
|
|
ssi on;
|
|
|
|
fancyindex on;
|
|
|
|
fancyindex_exact_size off;
|
|
|
|
fancyindex_default_sort date_desc;
|
|
|
|
fancyindex_time_format "%a, %e %B %Y %I:%M:%S %p";
|
|
|
|
subs_filter "<style type=\"text/css\">" "";
|
|
|
|
subs_filter "</syle>" "";
|
|
|
|
subs_filter "body,html {background:#fff;font-family:\"Bitstream Vera Sans\",\"Lucida Grande\",\"Lucida Sans Unicode\",Lucidux,Verdana,Lucida,sans-serif;}tr:nth-child(even) {background:#f4f4f4;}th,td {padding:0.1em 0.5em;}th {text-align:left;font-weight:bold;background:#eee;border-bottom:1px solid #aaa;}#list {border:1px solid #aaa;width:100%;}a {color:#a33;}a:hover {color:#e33;}" "<!--#include file=\"/nav\"-->";
|
|
|
|
error_page 403 /errors/403;
|
|
|
|
error_page 404 /errors/404;
|
|
|
|
error_page 503 /errors/503;
|
|
|
|
}
|