侧边栏壁纸
博主头像
liveJQ博主等级

沒有乐趣,何来开始

  • 累计撰写 146 篇文章
  • 累计创建 60 个标签
  • 累计收到 2 条评论

Nginx Proxy Manager 配置SSL报错“No module named 'zope'”

liveJQ
2023-08-30 / 0 评论 / 0 点赞 / 310 阅读 / 1,642 字 / 正在检测是否收录...
广告 广告

使用的 docker-compose 安装

version: '3.8'
services:
  app:
    image: 'jc21/nginx-proxy-manager:2.9.18'
    restart: unless-stopped
    ports:
      # These ports are in format <host-port>:<container-port>
      - '80:80' # Public HTTP Port
      - '443:443' # Public HTTPS Port
      - '8181:81' # Admin Web Port
      # Add any other Stream port you want to expose
      # - '21:21' # FTP

    # Uncomment the next line if you uncomment anything in the section
    # environment:
      # Uncomment this if you want to change the location of
      # the SQLite DB file within the container
      # DB_SQLITE_FILE: "/data/database.sqlite"

      # Uncomment this if IPv6 is not enabled on your host
      # DISABLE_IPV6: 'true'

    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

默认账号密码
admin@example.com
changeme

因为之前在其它地方部署过,配置参数完全一样,但就这里不行。

在配置通配符证书时报错

Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-6" --agree-tos --email "livejq@qq.com" --domains "*.livejq.top" --authenticator dns-dnspod --dns-dnspod-credentials "/etc/letsencrypt/credentials/credentials-6"
An unexpected error occurred:
ModuleNotFoundError: No module named 'zope'
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-q62hqia9/log or re-run Certbot with -v for more details.

    at ChildProcess.exithandler (node:child_process:399:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

报错信息提示缺少“zope”模块,这大概是由于当前主机的网络无法成功下载到该模块,解决的办法只能通过代理进行下载。

首先需要进入到该容器

docker exec -it $(docker ps -f "name=nginx_proxy_manager" -q) bash

等会需要通过代理下载安装包,所以先安装代理模块。

pip install pysocks

通过代理安装 zope 模块,代理地址修改为你的信息。

pip install zope --proxy=socks5://192.168.1.1:1080

安装好之后就可以配置成功啦。

0

评论区