Keep VIP stack isolated from Nomadro admin; pull/deploy scripts always snapshot /opt/hackrobot-backup first. Co-authored-by: Cursor <cursoragent@cursor.com>
77 lines
2.4 KiB
Plaintext
77 lines
2.4 KiB
Plaintext
server
|
|
{
|
|
listen 80;
|
|
server_name admin.hackrobot.cn;
|
|
#CERT-APPLY-CHECK--START
|
|
include /www/server/panel/vhost/nginx/well-known/admin.hackrobot.cn.conf;
|
|
#CERT-APPLY-CHECK--END
|
|
location ^~ /.well-known/acme-challenge/ {
|
|
root /www/wwwroot/admin.hackrobot.cn;
|
|
default_type text/plain;
|
|
}
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server
|
|
{
|
|
listen 443 ssl http2;
|
|
server_name admin.hackrobot.cn;
|
|
index index.html;
|
|
root /www/wwwroot/admin.hackrobot.cn;
|
|
|
|
#SSL-START
|
|
ssl_certificate /www/server/panel/vhost/cert/admin.hackrobot.cn/fullchain.pem;
|
|
ssl_certificate_key /www/server/panel/vhost/cert/admin.hackrobot.cn/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:!MD5;
|
|
ssl_prefer_server_ciphers on;
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_session_timeout 10m;
|
|
add_header Strict-Transport-Security "max-age=31536000";
|
|
error_page 497 https://$host$request_uri;
|
|
#SSL-END
|
|
|
|
# Live ops SSE/API (more specific than /api/)
|
|
include /www/server/panel/vhost/nginx/extension/admin.hackrobot.cn/*.conf;
|
|
|
|
# Ops API -> VIP next (4007) /api/ops /api/ops. Do NOT send to VIP Next 4007.
|
|
location ^~ /api/ {
|
|
proxy_pass http://127.0.0.1:4007;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host 127.0.0.1;
|
|
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 Connection "";
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
add_header Cache-Control "no-store" always;
|
|
proxy_connect_timeout 5s;
|
|
proxy_read_timeout 3600s;
|
|
}
|
|
|
|
location = /robots.txt {
|
|
default_type text/plain;
|
|
return 200 "User-agent: *\nDisallow: /\n";
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
add_header Cache-Control "no-cache";
|
|
}
|
|
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
|
|
expires 7d;
|
|
add_header Cache-Control "public";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
access_log /www/wwwlogs/admin.hackrobot.cn.log;
|
|
error_log /www/wwwlogs/admin.hackrobot.cn.error.log;
|
|
}
|