[root@localhost ~]# vim /usr/local/nginx/conf/nginx.conf
server {
listen 443;
server_name xxx.xxx.com;
ssl on;
root /var/www/wbase;
index index.html index.htm index.php;
ssl_certificate ../html/xxx.xxx.com.pem;
ssl_certificate_key ../html/xxx.xxx.com.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 /var/www/wbase;
index index.html index.htm index.php;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
root /var/www/wbase;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
截图修改:
参考地址:https://tengine.taobao.org/nginx_docs/cn/docs/http/configuring_https_servers.html