码迷,mamicode.com
首页 > Web开发 > 详细

nginx https

时间:2018-01-09 18:47:24      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:https   tls   undle   protoc   /etc   protocol   http   proxy   127.0.0.1   

==================================

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

标签:https   tls   undle   protoc   /etc   protocol   http   proxy   127.0.0.1   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!