lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
41.11k stars 9.36k forks source link

[Bug] 生产部署的反向代理域名端口这段是否可以添加如何配置的说明,另外是否可以添加GLM-4-Plus模型 #3724

Closed zhangleijun111 closed 2 weeks ago

zhangleijun111 commented 2 weeks ago

📦 部署环境

Docker

📌 软件版本

7.9

💻 系统环境

Other

🌐 浏览器

Other

🐛 问题描述

我的docker-compose logto: image: registry.us-west-1.aliyuncs.com/jg-images/logto:latest container_name: lobe-logto ports:

我的env NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg NEXT_AUTH_SSO_PROVIDERS=logto NEXTAUTH_URL=http://ai.jiu-guang.com:3210/api/auth LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET LOGTO_ISSUER=http://ai.jiu-guang.com:3001/oidc

📷 复现步骤

e32ca7517f9712ded191e2ada26dcd6 e32ca7517f9712ded191e2ada26dcd6 logto的报错截图

🚦 期望结果

No response

📝 补充信息

No response

lobehubbot commented 2 weeks ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


📦 Deployment environment

Docker

📌 Software version

7.9

💻 System environment

Other

🌐 Browser

Other

🐛 Problem description

my docker-compose logto: image: registry.us-west-1.aliyuncs.com/jg-images/logto:latest container_name: lobe-logto ports:

myenv NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg NEXT_AUTH_SSO_PROVIDERS=logto NEXTAUTH_URL=http://ai.jiu-guang.com:3210/api/auth LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET LOGTO_ISSUER=http://ai.jiu-guang.com:3001/oidc

📷 Steps to reproduce

e32ca7517f9712ded191e2ada26dcd6 e32ca7517f9712ded191e2ada26dcd6 Screenshot of logto error report

🚦 Expected results

No response

📝 Supplementary information

No response

lobehubbot commented 2 weeks ago

👀 @zhangleijun111

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

zhangleijun111 commented 2 weeks ago

📦 部署环境

码头工人

📌 软件版本

7.9

💻 系统环境

其他

🌐 浏览器

其他

🐛 问题描述

我的docker-compose logto: image: registry.us-west-1.aliyuncs.com/jg-images/logto:latest container_name: lobe-logto ports: - '3001:3001' - '3002:3002' depends_on: PostgreSQL: 条件: service_healthy 环境: - 'TRUST_PROXY_HEADER=1' - 'DB_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/logto' - 'ENDPOINT=http://ai.jiu-guang.com:3001' - 'ADMIN_ENDPOINT=http://ai.jiu-guang.com:3002' 入口点: ['sh', '-c', 'npm run cli db seed -- --swe & npm start']

我的env NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg NEXT_AUTH_SSO_PROVIDERS=logto NEXTAUTH_URL=http://ai.jiu-guang.com:3210/api/auth LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET LOGTO_ISSUER=http://ai.jiu-guang.com:3001/oidc

📷 复现步骤

e32ca7517f9712ded191e2ada26dcd6 e32ca7517f9712ded191e2ada26dcd6logto的报错截图

🚦 期望结果

无响应

📝 补充信息

无响应

补充一下我已经配置了nginx ssl

我们假设在上述服务之外,你还运行了一层 Nginx 来进行反向代理、配置 SSL。

域名和配套服务端口说明如下:

lobe.example.com:为你的 LobeChat 服务端域名,需要反向代理到 LobeChat 服务端口,默认为 3210 lobe-auth-api.example.com:为你的 Logto 服务端域名,需要反向代理到 Logto API 服务端口,默认为 3001 lobe-auth-ui.example.com:为你的 Logto UI 域名,需要反向代理到 Logto WebUI 服务端口,默认为 3002 lobe-s3-api.example.com:为你的 MinIO API 域名,需要反向代理到 MinIO API 服务端口,默认为 9000 lobe-s3-ui.example.com:可选,为你的 MinIO UI 域名,需要反向代理到 MinIO WebUI 服务端口,默认为 9001就这段说明我域名是否可以统一为一个

lobehubbot commented 2 weeks ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


📦 Deployment environment

Dockers

📌 Software version

7.9

💻 System environment

Others

🌐 Browser

Others

🐛 Problem description

My docker-compose logto: image: registry.us-west-1.aliyuncs.com/jg-images/logto:latest container_name: lobe-logto ports: - '3001:3001' - '3002:3002' depends_on: PostgreSQL: Condition: service_healthy Environment: - 'TRUST_PROXY_HEADER=1' - 'DB_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/logto' - 'ENDPOINT=http://ai.jiu-guang.com:3001' - 'ADMIN_ENDPOINT=http://ai.jiu-guang.com:3002' Entry point: ['sh', '-c', 'npm run cli db seed -- --swe & npm start']

My env NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg NEXT_AUTH_SSO_PROVIDERS=logto NEXTAUTH_URL=http://ai.jiu-guang.com:3210/api/auth LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID LOGTO_CLIENTSECRET=YOUR TO_CLIENT_SECRET LOGTO_ISSUER=http://ai.jiu-guang.com:3001 /oidc

📷 Steps to reproduce

![e32ca7517f9712ded191e2ada26dcd6](https://private-user-images.githubusercontent.com/169867372/363555585-e05cd3b4-6510-4f27-a158-5dd5c465ae3b.png?jwt=eyJhbGciOiJI UzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyNTc2MTUsIm5iZiI6MTcyNT I1NzMxNSwicGF0aCI6Ii8xNjk4NjczNzIvMzYzNTU1NTg1LWUwNWNkM2I0LTY1MTAtNGYyNy1hMTU4LTVkZDVjNDY1YWUzYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTY mWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwMlQwNjA4Mz VaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yNjk2MmU0ZDY1NGQzM2UzN2U4MTU5ZjNmMWIyMWJkMDgyNThmZTU2YTFkNDA0NmNmNzdhMWE2MmY4YTBjZmIzJlgtQW16LV ![e32ca7517f9712ded191e2ada26dc d6]( https://private-user-images.githubusercontent.com/169867372/363555610-ed740429-10b1-4771-85fc-3bd2751af2de.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWI uY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyNTc2MTUsIm5iZiI6MTcyNTI1NzMxNSwicGF0aCI6Ii8xNjk4NjczNzIvMzYzN TU1NjEwLWVkNzQwNDI5LTEwYjEtNDc3MS04NWZjLTNiZDI3NTFhZjJkZS5wbmc_WC1BbXotQW M1BRSzRaQSUyRjIwMjQwOTAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwMlQwNjA4MzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVN pZ25hdHVyZT04YmUwYzczOGViOGNmMjQ3OTU4NGFmZjU3YmJjOTc1OGVkYmI1MjNhZjlmMjExZTRiNWQ5OTBmYmQzY2ExMDJkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9p ZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.8grpThX5B2eensNE_xRPweEqTAZrQt0z6ZDE91Z4CyU)logto error screenshot

🚦 Expected results

No response

📝 Supplementary information

No response

To add that I have configured nginx ssl

We assume that in addition to the above services, you also run a layer of Nginx to perform reverse proxy and configure SSL.

The domain name and supporting service port are described as follows:

lobe.example.com: This is your LobeChat server domain name and needs to be reverse-proxyed to the LobeChat service port. The default is 3210. lobe-auth-api.example.com: For your Logto server domain name, you need to reverse proxy to the Logto API service port. The default is 3001 lobe-auth-ui.example.com: For your Logto UI domain name, you need to reverse proxy to the Logto WebUI service port, the default is 3002 lobe-s3-api.example.com: For your MinIO API domain name, you need to reverse proxy to the MinIO API service port, the default is 9000 lobe-s3-ui.example.com: Optional, for your MinIO UI domain name, you need to reverse proxy to the MinIO WebUI service port, the default is 9001. This paragraph explains whether my domain name can be unified into one

zhangleijun111 commented 2 weeks ago

这是我nginx的配置 server { listen 443 ssl; server_name ai.jiu-guang.com;

ssl_certificate /etc/nginx/ssl/ai.jiu-guang.com.crt; 
ssl_certificate_key /etc/nginx/ssl/ai.jiu-guang.com.key; 

# LobeChat 服务
location /lobe-chat/ {
    proxy_pass http://localhost:3210/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

# Logto API 服务
location /lobe-auth-api/ {
    proxy_pass http://localhost:3001/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

# Logto UI 服务
location /lobe-auth-ui/ {
    proxy_pass http://localhost:3002/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

# MinIO API 服务
location /lobe-s3-api/ {
    proxy_pass http://localhost:9000/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

# 可选的 MinIO UI 服务
location /lobe-s3-ui/ {
    proxy_pass http://localhost:9001/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}
lobehubbot commented 2 weeks ago

✅ @zhangleijun111

This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。