初始化:质量数据分析平台源码
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
# Nginx site for the locally hosted Quality Center API and static frontend.
|
||||
# Install only after the TLS certificate for quality.lyunlab.me exists.
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name quality.lyunlab.me;
|
||||
|
||||
location ^~ /.well-known/acme-challenge/ {
|
||||
root /var/www/letsencrypt;
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name quality.lyunlab.me;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/quality.lyunlab.me/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/quality.lyunlab.me/privkey.pem;
|
||||
|
||||
root /srv/quality-center/current;
|
||||
index index.html;
|
||||
|
||||
client_max_body_size 260m;
|
||||
access_log off;
|
||||
error_log /var/log/nginx/quality-center.error.log warn;
|
||||
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
||||
|
||||
# This bridge is reserved for the local NAO runtime, not remote browsers.
|
||||
location = /api/analysis/runtime/query {
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Health details are not part of the public frontend contract.
|
||||
location ^~ /actuator/ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ^~ /api/ {
|
||||
proxy_pass http://127.0.0.1:15281;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Connection "";
|
||||
|
||||
proxy_connect_timeout 5s;
|
||||
proxy_send_timeout 900s;
|
||||
proxy_read_timeout 900s;
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
|
||||
proxy_cookie_flags JSESSIONID secure;
|
||||
proxy_cookie_flags XSRF-TOKEN secure samesite=strict;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user