24 lines
743 B
Nginx Configuration File
24 lines
743 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name volleyball.my.to; # Замените на ваш домен
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:8000;
|
|
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;
|
|
}
|
|
|
|
location /static {
|
|
alias /opt/voley/static;
|
|
expires 7d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Опционально: SSL через certbot
|
|
# listen 443 ssl;
|
|
# ssl_certificate /etc/letsencrypt/live/volleyball.my.to/fullchain.pem;
|
|
# ssl_certificate_key /etc/letsencrypt/live/volleyball.my.to/privkey.pem;
|
|
}
|