Nginx配置SSL+PHPINFO樣例

server {
	listen       443;
	server_name blue-worker.localhost.cn;
	index   index.php index.html;
	root /data/htdocs/blue-worker.localhost.cn;

        ssl on;
        ssl_certificate  /usr/local/nginx/conf/cert/1936770_blue-worker.localhost.cn.pem;
        ssl_certificate_key  /usr/local/nginx/conf/cert/1936770_blue-worker.localhost.cn.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;


        location ~ \.php {
            fastcgi_pass   127.0.0.1:9002;
            fastcgi_index  index.php;
            include        fastcgi.conf;

           fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
           fastcgi_param PATH_INFO $fastcgi_path_info;
           fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
           }


	location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
		expires      30d;
	}

	location ~ .*\.(js|css)?$ {
		expires      1h;
	}
	access_log  /data/logs/www/blue-worker.localhost.cn.log  www;
	error_log  /data/logs/www/blue-worker.localhost.cn.log;
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章