This commit is contained in:
Gabriel Peron 2025-03-03 21:37:03 +01:00
parent 9da73c4fee
commit c39e18a377

View file

@ -1,9 +1,9 @@
server {
listen 657 ssl;
server_name your-domain.com;
server_name kvm.nazuna.ovh;
ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;
ssl_certificate /root/certs/pve-sto/cert.pem;
ssl_certificate_key /root/certs/pve-sto/key.pem;
location /pbs/ {
rewrite ^/pbs(/.*)$ $1 break;
@ -12,12 +12,13 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Accept-Encoding "";
sub_filter_once off;
sub_filter 'href="/' 'href="/pbs/';
sub_filter 'src="/' 'src="/pbs/';
sub_filter 'action="/' 'action="/pbs/';
sub_filter 'url: "/"' 'url: "/pbs/"';
}
location /main/ {
@ -27,12 +28,13 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Accept-Encoding "";
sub_filter_once off;
sub_filter 'href="/' 'href="/main/';
sub_filter 'src="/' 'src="/main/';
sub_filter 'action="/' 'action="/main/';
sub_filter 'url: "/"' 'url: "/main/"';
}
location /sto/ {
@ -42,11 +44,12 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Accept-Encoding "";
sub_filter_once off;
sub_filter 'href="/' 'href="/sto/';
sub_filter 'src="/' 'src="/sto/';
sub_filter 'action="/' 'action="/sto/';
sub_filter 'url: "/"' 'url: "/sto/"';
}
}