usersockets on seperate subdomain
This commit is contained in:
parent
12159d80fd
commit
602f5b6e43
|
@ -0,0 +1,14 @@
|
|||
add_header Onion-Location http://0$user.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
|
||||
|
||||
error_log /var/log/nginx/vern.cc-error.log info;
|
||||
|
||||
ssi on;
|
||||
|
||||
location / {
|
||||
proxy_pass http://unix:/var/socks/$user.sock;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
}
|
|
@ -1,15 +1,6 @@
|
|||
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 /sshfs/home/$user/public_html;
|
||||
index index.html index.php index.cgi index.py index.sh index.pl index.lua;
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name ~^0(?<user>[^.]+)\.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad\.onion;
|
||||
|
||||
include common/usersites-socket.conf;
|
||||
|
||||
error_page 502 =307 http://vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name ~^0(?<user>[^.]+)\.vern\.cc;
|
||||
include snippets/lets-encrypt.conf;
|
||||
|
||||
include common/usersites-socket.conf;
|
||||
|
||||
error_page 502 =307 https://vern.cc;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
return 301 https://$host$request_uri;
|
||||
server_name ~^0(?<user>[^.]+)\.vern\.cc;
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ server {
|
|||
|
||||
location / {
|
||||
#try_files @socket =404;
|
||||
try_files @socket $uri $uri/index.html $uri.html $uri/ @extensionless-php;
|
||||
try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
|
||||
if (!-d /vm/$user/public_html) {
|
||||
return 307 http://vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ server {
|
|||
|
||||
location / {
|
||||
#try_files @socket =404;
|
||||
try_files @socket $uri $uri/index.html $uri.html $uri/ @extensionless-php;
|
||||
try_files $uri $uri/index.html $uri.html $uri/ @extensionless-php;
|
||||
if (!-d /vm/$user/public_html) {
|
||||
return 307 https://vern.cc/;
|
||||
}
|
||||
|
@ -40,4 +40,3 @@ server {
|
|||
return 301 https://$host$request_uri;
|
||||
server_name ~^(?<user>[^.]+)\.vern\.cc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue