nginx配置https加密
安装nginx
官网:
https://nginx.org/
yum安装:
https://nginx.org/en/linux_packages.html
/etc/yum.repos.d/nginx.repo
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
yum install nginx
查找模块:
https://nginx.org/en/docs/dirindex.html
查找内容:
ssl_certificate (ngx_http_ssl_module)
ssl_certificate_key (ngx_http_ssl_module)
配置:
cd /etc/nginx/conf.d
vi ssl.ljbb.com.conf
server{
listen 443 ssl;
server_name ssl.ljbb.com;
# ssl key
ssl_certificate xxx;
ssl_certificate_key xxx;
root /app/code/ssl;
location / {
index index.html
}
}
配置window和linux的hosts文件
浏览器访问:
ssl.ljbb.com
原文地址:https://blog.csdn.net/houduanq/article/details/142718046
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!