6b288bfa49
Replace sac.kalinamall.ru with sac.example.com in public docs/deploy. Remove Push-Mirror and Rewrite-GitHostUrls scripts from repo. Simplify workspace-three-repos.md for GitHub-only workflow. Co-authored-by: Cursor <cursoragent@cursor.com>
44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
# /etc/nginx/sites-available/sac
|
|
# Production FQDN: sac.example.com
|
|
# API: 127.0.0.1:8000 (systemd sac-api)
|
|
#
|
|
# Hostname: только sac.example.com; остальные Host → 444 (см. default_server ниже).
|
|
#
|
|
# Порядок: 1) этот конфиг (только :80) → nginx -t → reload
|
|
# 2) certbot --nginx -d sac.example.com (добавит :443 и сертификаты)
|
|
|
|
upstream sac_api {
|
|
server 127.0.0.1:8000;
|
|
keepalive 8;
|
|
}
|
|
|
|
# --- default: отклонить чужие Host (не sac.example.com) ---
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
server_name _;
|
|
return 444;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name sac.example.com;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/html;
|
|
}
|
|
|
|
client_max_body_size 2m;
|
|
|
|
location / {
|
|
proxy_pass http://sac_api;
|
|
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;
|
|
}
|
|
}
|