sybiko_website/nginx/nginx.conf
Zikil de0f4b0d11
Some checks failed
Deploy FastAPI Application / deploy (push) Failing after 12s
test ci/cd
2024-12-08 01:02:05 +07:00

29 lines
996 B
Nginx Configuration File

server {
listen 80;
server_name sybiko.ru; # Замените на ваш домен
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name sybiko.ru; # Замените на ваш домен
ssl_certificate /etc/letsencrypt/live/sybiko.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sybiko.ru/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:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
location / {
proxy_pass http://fastapi:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}