docs: native Ubuntu install as primary; systemd and nginx
- install-ubuntu-24.04-native.md (production) and -docker.md (alternative) - deploy/systemd/sac-api.service, nginx/sac.conf.example, env.native.example - deployment, README, INDEX, work-plan, TZ updated
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# /etc/nginx/sites-available/sac
|
||||
# Замените sac.example.com на ваш FQDN.
|
||||
# API слушает только 127.0.0.1:8000 (systemd sac-api).
|
||||
|
||||
upstream sac_api {
|
||||
server 127.0.0.1:8000;
|
||||
keepalive 8;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name sac.example.com;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/html;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name sac.example.com;
|
||||
|
||||
# После certbot пути подставятся автоматически, либо укажите вручную:
|
||||
# ssl_certificate /etc/letsencrypt/live/sac.example.com/fullchain.pem;
|
||||
# ssl_certificate_key /etc/letsencrypt/live/sac.example.com/privkey.pem;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user