阿里云《nginx服务器配置SSL证书》 配置参数

server {
   
    
    listen 443;
    server_name demo.shengruijt25.com;
    ssl on;
    root html;
    index index.html index.htm;
    ssl_certificate   /data/website/demo_373/cert/demo.pem;
    ssl_certificate_key /data/website/demo_373/cert/demo.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 / {
		root   /data/website/demo_373;
		index  index.html index.htm index.php;
		if (!-e $request_filename) {
			rewrite ^/index.php(.*)$ /index.php?s=$1 last;
			rewrite ^(.*)$ /index.php?s=$1 last;
			break;
		}
	}
	access_log  /data/website/log/demo_373.log   main;
	location ~ \.php$ {
		root   /data/website/demo_373;
		include        fastcgi.conf;
		fastcgi_pass   127.0.0.1:9000;
		fastcgi_index  index.php;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
	}
}


 注意: crt或者cer证书可以直接改后缀名为pem证书
posted @ 2018-11-01 14:58  滴水穿石!  阅读(1736)  评论(0编辑  收藏  举报