mouai
This commit is contained in:
parent
47fd11195d
commit
9da73c4fee
1 changed files with 32 additions and 33 deletions
|
@ -1,53 +1,52 @@
|
|||
server {
|
||||
listen 564 ssl;
|
||||
server_name kvm.nazuna.ovh;
|
||||
listen 657 ssl;
|
||||
server_name your-domain.com;
|
||||
|
||||
# SSL configuration
|
||||
ssl_certificate /root/certs/pve-sto/cert.pem;
|
||||
ssl_certificate_key /root/certs/pve-sto/key.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.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_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_read_timeout 3600;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
sub_filter_once off;
|
||||
sub_filter 'href="/' 'href="/pbs/';
|
||||
sub_filter 'src="/' 'src="/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_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_read_timeout 3600;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
sub_filter_once off;
|
||||
sub_filter 'href="/' 'href="/main/';
|
||||
sub_filter 'src="/' 'src="/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_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
sub_filter_once off;
|
||||
sub_filter 'href="/' 'href="/sto/';
|
||||
sub_filter 'src="/' 'src="/sto/';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue