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

https和http共存的nginx配置

时间:2016-09-18 19:27:18      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:


server {
        listen       80;
        listen      443 ssl;
        server_name  test.xx.com;
        index index.html index.htm index.php;
        root /usr/local/default;
        location ~ .*\.(php|php5)?$
        {
                #fastcgi_pass  unix:/tmp/php-cgi.sock;
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi.conf;
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
                #expires 30d;
        }
        location ~ .*\.(js|css)?$
        {
                #expires 1h;
        }
       
        access_log  logs/test.access.log;
        ssl_certificate /x.com_bundle.crt;
        ssl_certificate_key /x.com.key;
        ssl_session_timeout  5m;
        ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
        ssl_prefer_server_ciphers   on;
}

https和http共存的nginx配置

标签:

原文地址:http://www.cnblogs.com/gpfeisoft/p/5882586.html

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