nginx-configs/conf.d/usersites.conf

46 lines
1.0 KiB
Plaintext
Raw Normal View History

2022-07-25 10:55:46 +00:00
server {
listen 80;
listen [::]:80;
server_name ~^(?<user>[^.]+)\.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad\.onion;
include common/usersites.conf;
2022-12-13 09:33:14 +00:00
subs_filter "gcdn.vern.cc" "gcdn.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion";
location / {
#try_files @socket =404;
2022-10-29 17:20:37 +00:00
try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
if (!-d /vm/$user/public_html) {
return 307 http://vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/;
}
autoindex on;
2023-07-18 22:46:34 +00:00
ssi on;
}
2022-07-25 10:55:46 +00:00
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ~^(?<user>[^.]+)\.vern\.cc;
include snippets/lets-encrypt.conf;
2022-07-26 11:37:37 +00:00
include common/usersites.conf;
location / {
#try_files @socket =404;
2022-10-29 17:20:37 +00:00
try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
if (!-d /vm/$user/public_html) {
return 307 https://vern.cc/;
}
autoindex on;
2023-07-18 22:46:34 +00:00
ssi on;
}
2022-07-25 10:55:46 +00:00
}
server {
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
server_name ~^(?<user>[^.]+)\.vern\.cc;
}