langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
52.36k stars 7.63k forks source link

How to change the default HTTP port? | 如何修改 默认HTTP端口? #10941

Closed unsiao closed 1 day ago

unsiao commented 1 day ago

Self Checks

Provide a description of requested docs changes

I tried modifying the following two options in the .env file, but it didn't work:

# HTTP port
NGINX_PORT=80
# SSL settings are only applied when HTTPS_ENABLED is true
NGINX_SSL_PORT=443
dosubot[bot] commented 1 day ago

Hello @unsiao! I'm here to help you with any bugs, questions, and contributions you might have. I'm a bot named Dosu, and I'm at your service while you wait for a human maintainer.

I found some relevant discussions and issues regarding changing the default HTTP port in Dify:

  1. Install(signup) page redirected to signin page after changing the default nginx port - This discussion is unsolved and might provide some insights into similar issues [1].

  2. Nginx is listening on port 80 instead of the value of ${NGINX_PORT} that I set in the .env file. - This issue was closed with a solution provided by a pull request to improve Docker Compose settings [2].

To change the default HTTP port, ensure you update the NGINX_PORT variable in your .env file. After making changes to the .env file, you need to restart the Docker Compose services to apply these changes. You can do this by running the following commands in the docker directory:

docker compose down
docker compose up -d

This will stop the running containers and recreate them with the updated environment variables from the .env file [3][4].

To continue talking to Dosu, mention @dosu.