2026-09-12 05:53:05 +03:00
|
|
|
server {
|
|
|
|
|
listen 80 default_server;
|
2026-09-12 06:40:42 +03:00
|
|
|
server_name unitprint.ru local.unitprint.ru 192.168.20.1 _
|
2026-09-12 05:53:05 +03:00
|
|
|
connectivitycheck.android.com
|
|
|
|
|
connectivitycheck.gstatic.com
|
|
|
|
|
clients3.google.com
|
|
|
|
|
www.google.com;
|
|
|
|
|
|
|
|
|
|
location = /generate_204 { return 204; }
|
|
|
|
|
location = /gen_204 { return 204; }
|
|
|
|
|
location = /hotspot-detect.html { return 204; }
|
|
|
|
|
location = /connecttest.txt { return 204; }
|
|
|
|
|
location = /mobile/status.php { return 204; }
|
|
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
server {
|
|
|
|
|
listen 443 ssl;
|
|
|
|
|
http2 on;
|
|
|
|
|
|
2026-09-12 06:40:42 +03:00
|
|
|
server_name unitprint.ru local.unitprint.ru 192.168.20.1 _;
|
2026-09-12 05:53:05 +03:00
|
|
|
|
|
|
|
|
ssl_certificate /pkg/gnu/unitprint/certs/fullchain.pem;
|
|
|
|
|
ssl_certificate_key /pkg/gnu/unitprint/certs/privkey.pem;
|
|
|
|
|
|
|
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
|
|
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
|
|
|
|
|
ssl_prefer_server_ciphers off;
|
|
|
|
|
ssl_session_cache shared:SSL:10m;
|
|
|
|
|
ssl_session_timeout 1d;
|
|
|
|
|
ssl_session_tickets off;
|
|
|
|
|
|
|
|
|
|
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;
|
|
|
|
|
add_header X-Content-Type-Options nosniff always;
|
|
|
|
|
|
|
|
|
|
root /pkg/gnu/unitprint/web-app/dist;
|
|
|
|
|
index index.html;
|
|
|
|
|
|
|
|
|
|
gzip on;
|
|
|
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
|
|
|
|
gzip_min_length 1000;
|
|
|
|
|
|
|
|
|
|
location /api/ {
|
|
|
|
|
proxy_pass http://127.0.0.1:3000/;
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
client_max_body_size 50M;
|
|
|
|
|
|
|
|
|
|
proxy_read_timeout 300s;
|
|
|
|
|
proxy_send_timeout 300s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
location /assets/ {
|
|
|
|
|
expires 1y;
|
|
|
|
|
add_header Cache-Control "public, immutable";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ~* ^/(sw\.js|registerSW\.js|manifest\.webmanifest)$ {
|
|
|
|
|
expires -1;
|
|
|
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
|
}
|
|
|
|
|
}
|