server { listen 80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/host.access.log main; location /static/ { alias /var/www/api/laowai_panda/static/; } location /media/ { alias /var/www/api/laowai_panda/media/; } location = /download.html { root /var/www/api/laowai_panda/; } location / { include uwsgi_params; uwsgi_pass 127.0.0.1:8000; client_max_body_size 200m; } #listen 443 ssl; # managed by Certbot #ssl_certificate /etc/letsencrypt/live/laowaipanda.com/fullchain.pem; # managed by Certbot #ssl_certificate_key /etc/letsencrypt/live/laowaipanda.com/privkey.pem; # managed by Certbot #include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ .php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ .php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /.ht { # deny all; #} } server { listen 443 ssl; server_name laowaipanda.com; #ssl on; #charset koi8-r; #access_log /var/log/nginx/host.access.log main; location /static/ { alias /var/www/api/laowai_panda/static/; } location /media/ { alias /var/www/api/laowai_panda/media/; } location = /download.html { root /var/www/api/laowai_panda/; } location / { include uwsgi_params; uwsgi_pass 127.0.0.1:8000; client_max_body_size 200m; } ssl_certificate /etc/nginx/cert/4426061_www.laowaipanda.com.pem; ssl_certificate_key /etc/nginx/cert/4426061_www.laowaipanda.com.key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }