nginx server conf
server {
listen 443;
charset utf-8;
ssl on;
ssl_certificate /opt/disk2/var/serverconfig/server.cert;
ssl_certificate_key /opt/disk2/var/serverconfig/server.key;
location / {
root /opt/disk2/var/www;
uwsgi_pass 127.0.0.1:9001;
include uwsgi_params;
}
# location /media/ {
# alias /opt/disk2/var/www/static/;
# limit_conn perip 10;
# limit_rate 200k;
# limit_req zone=portal burst=60;
# expires 5d;
# }
location /static/ {
expires 5d;
alias /opt/disk2/var/www/static/;
}
location ^(.*)\.favicon.ico$ {
log_not_found off;
}
location ~ /\.svn(.*)$ {
deny all;
}
}
server {
listen 80;
charset utf-8;
server_name localhost;
root /opt/disk2/var/www;
location / {
root /opt/disk2/var/www;
uwsgi_pass 127.0.0.1:9001;
include uwsgi_params;
}
# location /media/ {
# alias /opt/disk2/var/www/static/;
# limit_conn perip 10;
# limit_rate 200k;
# limit_req zone=portal burst=60;
# expires 5d;
# }
location /static/ {
expires 5d;
alias /opt/disk2/var/www/static/;
}
location ^(.*)\.favicon.ico$ {
log_not_found off;
}
location ~ /\.svn(.*)$ {
deny all;
}
}