docker-compose安装nginx配置hppts 报错

[emerg] 1#1: cannot load certificate “/etc/ssl/certs/cloud.crt”: BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(‘/etc/ssl/certs/cloud.crt’,‘r’) error:2006D080:BIO routines:BIO_new_file:no such file)

    volumes:
      - ./nginx/letsencrypt/wordsfairy.cloud.crt:/etc/ssl/certs/wordsfairy.cloud.crt

docker-compose.yml 部分代码

ruoyi-nginx:
    container_name: ruoyi-nginx
    image: nginx
    build:
      context: ./nginx
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/html/wordsfairy:/home/web/app
      - ./nginx/conf.d:/etc/nginx/conf.d
      - ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
      - ./nginx/logs:/var/log/nginx
      - ./nginx/letsencrypt/wordsfairy.cloud.crt:/etc/ssl/certs/wordsfairy.cloud.crt
      - ./nginx/letsencrypt/wordsfairy.cloud.key:/etc/ssl/certs/wordsfairy.cloud.key
    privileged: true
    depends_on:
      - ruoyi-gateway
    links:
      - ruoyi-gateway

nginx.conf 部分代码

 server {
        listen       80;
        listen       443 ssl;
        server_name  www.wordsfairy.cloud wordsfairy.cloud;
        ssl_certificate     /etc/ssl/certs/wordsfairy.cloud_bundle.pem;
        ssl_certificate_key /etc/ssl/certs/wordsfairy.cloud.key;
        ssl_session_timeout 5m;
        # 配置协议
        ssl_protocols       TLSv1.2 TLSv1.3;
        #请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_prefer_server_ciphers on; 
        ...
        ...
    }
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

九狼JIULANG

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值