- nginx: add proxy routes for /settings/, /templates/, /ipam/, /logs/, /admin/, /health
- dashboard: fix data format mismatch (servers[] not nodes[]/vms[])
- dashboard: add WebSocket subscription to dashboard_metrics for real-time updates
- dashboard: connect activity feed to /logs/api/logs endpoint
- dashboard: reduce polling to 15s with WS as primary update source
- graphs: fix rrddata response unwrap (backend returns {data:[],timeframe:''})
- graphs: add i18n translations for chart titles
- console: add xterm.js CSS import for proper terminal rendering
- console: add i18n translations (connecting, reconnect)
- workspace: add switcher dropdown in TopBar
- workspace: add edit dialog in WorkspacesPage
- workspace: create Zustand store with localStorage persistence
- workspace: add X-Active-Workspace header to API client
- sidebar: replace generic icon with actual favicon.svg logo
- instances: translate RowActionMenu and InstanceDetailPage strings
- locales: add graphs, console, workspace, instance tab keys to en/ru
83 lines
2.5 KiB
Plaintext
83 lines
2.5 KiB
Plaintext
# NGINX Configuration Template for Server Panel (HTTP only, no SSL)
|
|
# Replace DOMAIN_NAME with your actual domain or server IP
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name DOMAIN_NAME;
|
|
|
|
# Logging
|
|
access_log /var/log/nginx/serverpanel_access.log;
|
|
error_log /var/log/nginx/serverpanel_error.log;
|
|
|
|
# Let's Encrypt challenge (needed for SSL certificate obtaining)
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# Rate limiting
|
|
limit_req zone=general burst=20 nodelay;
|
|
limit_conn addr 10;
|
|
|
|
# Health check endpoint
|
|
location /health {
|
|
proxy_pass http://serverpanel-app:8000;
|
|
access_log off;
|
|
}
|
|
|
|
# API proxy
|
|
location /api/ {
|
|
limit_req zone=api burst=50 nodelay;
|
|
proxy_pass http://serverpanel-app:8000;
|
|
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 X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
# Proxmox API proxy
|
|
location /proxmox/ {
|
|
proxy_pass http://serverpanel-app:8000;
|
|
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 X-Forwarded-Proto $scheme;
|
|
proxy_read_timeout 60s;
|
|
}
|
|
|
|
# WebSocket support — tasks и terminal
|
|
location ~ ^/(ws|proxmox/ws)/ {
|
|
proxy_pass http://serverpanel-app:8000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
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_read_timeout 86400;
|
|
proxy_send_timeout 86400;
|
|
}
|
|
|
|
# Backend static files (legacy, logo, etc.)
|
|
location /static/ {
|
|
proxy_pass http://serverpanel-app:8000;
|
|
proxy_cache_valid 200 1d;
|
|
expires 1d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# SPA frontend — all other routes
|
|
location / {
|
|
proxy_pass http://serverpanel-frontend:80;
|
|
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 X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|