server { listen 443 ssl; server_name exsi.yxdict.com; ssl_certificate /home/zzywb/ssl/exsi.yx.com_bundle.pem; ssl_certificate_key /home/zzywb/ssl/exsi.yx.com.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; # charset koi8-r; # allow 61.0.0.6; # allow 180.0.0.0/16; # deny all; location / { proxy_pass https://10.0.0.10/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; # access_log off; } location /uploadfile { # alias /home//wwwroot/jessica/media/uploadfile ; access_log off; } location /favicon.ico { # alias /home//wwwroot/jessica/static/images/favicon.ico ; access_log off; } error_page 404 /404.html; }
server { listen 80 default; server_name localhost; # charset koi8-r; location / { uwsgi_pass 127.0.0.1:8000; # uwsgi_pass unix:/wwwroot/jessica/logs/jessica01.sock; include uwsgi_params; access_log off; error_log off; } location /static { alias /home//wwwroot/jessica/static ; access_log off; error_log off; } location /uploadfile { alias /home//wwwroot/jessica/media/uploadfile ; access_log off; error_log off; } location /favicon.ico { alias /home//wwwroot/jessica/static/images/favicon.ico ; access_log off; } error_page 404 /404.html; }
标签:基本,off,log,ssl,配置,nginx,proxy,home,location From: https://www.cnblogs.com/jsingsunck/p/16852656.html