Nginx 1.18.0配置SSL
1: 配置方式
server {
listen 443 default ssl;
server_name hanye.net;
include deny_host.conf;
root /home/erp/hanye_web/api/public;
index index.html index.htm index.php;
ssl_certificate /usr/local/nginx/conf/ssl/hanye.net.crt;
ssl_certificate_key /usr/local/nginx/conf/ssl/hanye.net.key;
ssl_session_timeout 10m;
ssl_buffer_size 64k;
ssl_session_cache shared:SSL:10m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 SSLv3;
ssl_prefer_server_ciphers on;
location / {
root /home/erp/hanye_web/api/public;
try_files $uri $uri/ /index.html;
index index.php;
if (!-e $request_filename){
rewrite (.*) /index.php last;
}
}
location ~ [^/]\.php(/|$) {
root /home/erp/hanye_web/api/public;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}
配置 listen 443 ssl; 报错
目前不知道什么原因 配置 listen 443 default ssl; 正常启动
有知道问题的 麻烦说下