testhttps.conf
server {
listen 80;
server_name testhttps.lvshuo.com;
rewrite ^(.*) https://$server_name$1 permanent;
}
server {
listen 443; #指定ssl监听端口
server_name testhttps.lvshuo.com;
ssl on; #开启ssl支持
ssl_certificate /usr/local/nginx/214621679640317.pem;
ssl_certificate_key /usr/local/nginx/214621679640317.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;
root /home/www/wwwroot/testhttps/public;
index index.html index.htm index.php;
include enable-php.conf;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
access_log /home/www/wwwlogs/dljzlg.log;
}