不灭的火

革命尚未成功,同志仍须努力下载JDK17

作者:AlbertWen  添加时间:2025-08-13 19:54:55  修改时间:2025-08-19 12:04:37  分类:07.Dify.ai  编辑

找到dify的配置文件:/data/dify/docker/.env

一、配置域名和安全证书

(1) 设置域名:dify.woyoalliance.com

(2) 上传域名证书,如下所示路径:

  • /data/dify/docker/nginx/ssl/dify.woyoalliance.com.key
  • /data/dify/docker/nginx/ssl/dify.woyoalliance.com.pem

(3) 设置域名证书路径,最终的配置文件内容如下:

# ------------------------------
# Environment Variables for Nginx reverse proxy
# ------------------------------
NGINX_SERVER_NAME=dify.woyoalliance.com     #【修改1】
NGINX_HTTPS_ENABLED=true
# HTTP port
NGINX_PORT=80
# SSL settings are only applied when HTTPS_ENABLED is true
NGINX_SSL_PORT=443
# if HTTPS_ENABLED is true, you're required to add your own SSL certificates/keys to the `./nginx/ssl` directory
# and modify the env vars below accordingly.
NGINX_SSL_CERT_FILENAME=dify.woyoalliance.com.pem          #【修改2】
NGINX_SSL_CERT_KEY_FILENAME=dify.woyoalliance.com.key      #【修改3】
NGINX_SSL_PROTOCOLS=TLSv1.1 TLSv1.2 TLSv1.3

(4) 阿里云后台配置DNS域名指向

二、配置发送域名

忘记密码时,可以用它给用户发送重置密码的邮件

# Default send from email address, if not specified
MAIL_DEFAULT_SEND_FROM=albert888@aaa-china.com

# API-Key for the Resend email provider, used when MAIL_TYPE is `resend`.
RESEND_API_URL=https://api.resend.com
RESEND_API_KEY=your-resend-api-key


# SMTP server configuration, used when MAIL_TYPE is `smtp`
SMTP_SERVER=smtp.exmail.qq.com
SMTP_PORT=465
SMTP_USERNAME=albert888@aaa-china.com
SMTP_PASSWORD=mwbLMJEiGUcUmSaG
SMTP_USE_TLS=true
SMTP_OPPORTUNISTIC_TLS=false