欢迎光临
我们一直在努力

nginx ssl证书

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;
        }
}

 

赞(0)
版权归原作者所有,如有侵权请告知。达维营-前端网 » nginx ssl证书

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址