扫码关注官方订阅号
有比较详细的教程吗?尽量简单、小白一些的。
以LNMP环境为例子首先你得买ssl 证书,然后在/usr/local/nginx/conf目录创建一个目录,将ssl证书放进去,然后在nginx.conf的server里面配置,改的时候先备份
LNMP
/usr/local/nginx/conf
server
server { #listen 80; listen 443; server_name www.yourdomain.com; ssl on; ssl_certificate ./你的目录/XXX.crt; ssl_certificate_key ./你的目录/XXX.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; index index.html index.htm index.php default.html default.htm default.php; root /home/wwwroot/www.yourdomain.com; location / { # phpbb uses index.htm index index.php index.html index.htm; try_files $uri $uri/ @rewriteapp; }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
以
LNMP
环境为例子首先你得买ssl 证书,然后在
/usr/local/nginx/conf
目录创建一个目录,将ssl证书放进去,然后在nginx.conf的server
里面配置,改的时候先备份