安装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