首页 > Web开发 > 详细

nginx https

时间:2018-01-09 18:32:05      阅读:204      评论:0      收藏:0      [点我收藏+]
==================================

server{
listen 443;
server_name farm.gz.1252039095.clb.myqcloud.com;
ssl on;
ssl_certificate /etc/pki/tls/certs/1_farm.gz.1252039095.clb.myqcloud.com_bundle.crt;
ssl_certificate_key /etc/pki/tls/certs/2_farm.gz.1252039095.clb.myqcloud.com.key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers HIGH:!ADH:!EXPORT56:RC4+RSA:+MEDIUM;
ssl_prefer_server_ciphers on;
location ~ .php$ {
root /var/www/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location / {
root /var/www/html;
index index.php index.html index.htm ;
}

}

server
{
listen 80;

server_name d1.farm.kuanggame.com;

    keepalive_timeout       300;

ssl on;
ssl_certificate /etc/pki/tls/certs/1_d1.farm.kuanggame.com_bundle.crt;
ssl_certificate_key /etc/pki/tls/certs/2_d1.farm.kuanggame.com.key;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

location /
{
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_read_timeout 300;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
}
}

nginx https

原文:http://blog.51cto.com/2935559/2059135

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!