mirror of
https://github.com/Hopiu/django-fobi.git
synced 2026-05-11 06:13:10 +00:00
48 lines
1.3 KiB
Nginx Configuration File
48 lines
1.3 KiB
Nginx Configuration File
|
|
upstream %(proj_name)s {
|
|
server 127.0.0.1:%(gunicorn_port)s;
|
|
}
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
%(ssl_disabled)s listen 443 ssl;
|
|
server_name %(domains_nginx)s;
|
|
client_max_body_size 10M;
|
|
keepalive_timeout 15;
|
|
|
|
%(ssl_disabled)s ssl_certificate conf/%(proj_name)s.crt;
|
|
%(ssl_disabled)s ssl_certificate_key conf/%(proj_name)s.key;
|
|
%(ssl_disabled)s ssl_session_cache shared:SSL:10m;
|
|
%(ssl_disabled)s ssl_session_timeout 10m;
|
|
%(ssl_disabled)s ssl_ciphers RC4:HIGH:!aNULL:!MD5;
|
|
%(ssl_disabled)s ssl_prefer_server_ciphers on;
|
|
|
|
location / {
|
|
proxy_redirect off;
|
|
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-Protocol $scheme;
|
|
proxy_pass http://%(proj_name)s;
|
|
}
|
|
|
|
location /static/ {
|
|
root %(proj_path)s;
|
|
access_log off;
|
|
log_not_found off;
|
|
}
|
|
|
|
location /robots.txt {
|
|
root %(proj_path)s/static;
|
|
access_log off;
|
|
log_not_found off;
|
|
}
|
|
|
|
location /favicon.ico {
|
|
root %(proj_path)s/static/img;
|
|
access_log off;
|
|
log_not_found off;
|
|
}
|
|
|
|
}
|