Nginx-config-proxmox/Conf/Proxmox.conf
2025-03-03 00:50:38 +01:00

53 lines
1.8 KiB
Text

server {
listen 564 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/;
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 VE location (e.g., Proxmox VE 2)
location /sto/ {
rewrite ^/sto/(.*) /$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;
}
# Optional: Redirect HTTP to HTTPS
error_page 497 https://$host$request_uri;
}