nginx ssl证书配置
配置文件如下:
server { listen 443; server_name xxx.com; root "/home/www/website"; ssl on; ssl_certificate /usr/local/nginx/conf/xxx.crt; #ssl crt证书存放路径 ssl_certificate_key /usr/local/nginx/conf/xxx.key; #ssl key证书存放路径 ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置 ssl_prefer_server_ciphers on; location / { index index.html index.htm index.php; #autoindex on; } location ~ \.php(.*)$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^((?U).+\.php)(/?.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root; include fastcgi_params; } }