我将尝试解释使用.pfx文件的最简单方法,该文件可用于在NGINX上安装SSL。

我们首先使用openssl使用以下命令提取CRT文件

openssl pkcs12 -in ./YOUR-PFX-FILE.pfx -clcerts -nokeys -out domain.crt
然后使用以下命令提取私钥

openssl pkcs12 -in ./YOUR-PFX-FILE.pfx -nocerts -nodes -out domain.rsa

nginx配置

server {
 listen 443 ssl;
 server_name domain.com domain.com;
 ssl_certificate /path/to/your/CRT_file/domain.crt;
 ssl_certificate_key /path/to/your/RSA_file/domain.rsa;

 root /mnt/coming-soon/bushbeans;
 index index.html;
 include /etc/nginx/mime.types;
}

参考:https://blog.knoldus.com/easiest-way-to-setup-ssl-on-nginx-using-pfx-files/#comments

如何用dockerfile 和 docker compose 安装php82

1.创建Dockerfile 文件名:Dockerfile.php-fpm82 FROM php:8.2-fpm # 安装必要的依赖 RUN apt-get update && apt-get install -y --no-install-recom...

阅读全文

Linux使用lsyncd实现2个文件夹实时同步

官方文档: https://axkibe.github.io/lsyncd/download/ 1.安装 $ yum install lsyncd $ yum install rsync $ yum install libtermcap-devel ncurses-devel l...

阅读全文

firewall 防火墙常用命令

查看版本 $ firewall-cmd --version 0.4.3.3 help $ firewall-cmd --help 状态 $ firewall-cmd --state running 重载配置 $ firewall-cmd --reload 重新加载...

阅读全文

评论已经关闭。