Compare commits

...

2 commits

Author SHA1 Message Date
c39e18a377 moint pt 2025-03-03 21:37:03 +01:00
9da73c4fee mouai 2025-03-03 21:30:08 +01:00

View file

@ -1,53 +1,55 @@
server {
listen 564 ssl;
listen 657 ssl;
server_name kvm.nazuna.ovh;
# SSL configuration
ssl_certificate /root/certs/pve-sto/cert.pem;
ssl_certificate_key /root/certs/pve-sto/key.pem;
# Main Proxmox VE location (e.g., Proxmox VE 1)
location /main/ {
rewrite ^/main/(.*) /$1 break;
proxy_pass https://192.168.2.180:8006/;
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 X-Forwarded-Proto $scheme;
proxy_ssl_verify off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_read_timeout 3600;
}
# Proxmox Backup Server location (e.g., PBS)
location /pbs/ {
rewrite ^/pbs/(.*) /$1 break;
proxy_pass https://192.168.2.179:8007/;
rewrite ^/pbs(/.*)$ $1 break;
proxy_pass https://192.168.2.180:8007/;
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 X-Forwarded-Proto $scheme;
proxy_ssl_verify off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_read_timeout 3600;
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/"';
}
# Proxmox VE location (e.g., Proxmox VE 2)
location /sto/ {
rewrite ^/sto/(.*) /$1 break;
location /main/ {
rewrite ^/main(/.*)$ $1 break;
proxy_pass https://192.168.2.178:8006/;
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 X-Forwarded-Proto $scheme;
proxy_ssl_verify off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_read_timeout 3600;
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/"';
}
# Optional: Redirect HTTP to HTTPS
error_page 497 https://$host$request_uri;
location /sto/ {
rewrite ^/sto(/.*)$ $1 break;
proxy_pass https://192.168.2.179:8006/;
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 X-Forwarded-Proto $scheme;
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/"';
}
}