Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After deploying the non-80 port, publish the application and jump to the new web page to carry the port. #4449

Closed
4 tasks done
kokojacket opened this issue May 16, 2024 · 8 comments
Labels
🐞 bug Something isn't working

Comments

@kokojacket
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

latest

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image
image
image

✔️ Expected Behavior

You should also need to carry port 3000 before you can use it after the jump__

❌ Actual Behavior

After deploying the non-80 port, publish the application and jump to the new web page to carry the port.
image

Copy link

dosubot bot commented May 16, 2024

To address the "404 Not Found" error when accessing your application on port 3000, ensure the following:

  1. Application Configuration: Confirm your application's configuration files correctly reference port 3000. This is crucial for the application to expect traffic on this port.

  2. Web Server Configuration: If using a web server like Nginx or Apache as a reverse proxy, it must be configured to forward requests to your application on port 3000. This involves setting up a server block or virtual host to either listen on port 3000 or forward requests to localhost:3000.

  3. Firewall and Network Configuration: Check that your server's firewall rules allow incoming connections on port 3000. Additionally, if behind a router or firewall, set up port forwarding to direct traffic to your server on this port.

  4. Verify Application is Running: Ensure your Dify application is running and listening on port 3000. Use commands like netstat -tuln | grep 3000 or lsof -i :3000 to check.

  5. DNS and Browser Cache: If using a domain name, ensure DNS settings correctly point to your server's IP. Also, clear your browser cache and cookies to avoid issues with cached redirects or site versions.

In your docker-compose.yml, under the service you wish to expose (e.g., web for the frontend web application), ensure the ports configuration is set to "3000:3000" to map port 3000 of the host to port 3000 of the container, making it accessible externally.

Dify uses the yarl library for URL generation and manipulation, which supports dynamic construction of URLs, including appending paths and handling non-standard ports efficiently.

By following these steps and ensuring correct configuration and environment setup, you should be able to resolve the "404 Not Found" error and access your web page on port 3000.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@dosubot dosubot bot added the 🐞 bug Something isn't working label May 16, 2024
@patryk20120
Copy link
Contributor

I don't really get the issue here. Have you change something in docker-compose file?

@kokojacket
Copy link
Author

image
I only changed this

@patryk20120
Copy link
Contributor

So you should access the web on that port http://localhost:10034

@kokojacket
Copy link
Author

So you should access the web on that port http://localhost:10034

I used a reverse proxy tool to proxy http://localhost:10034/ to the public network. Then when I used "publish", the port would disappear when jumping. __

@superstring
Copy link

may be web should add nginx expose-port config, rather than always use 80

@kuit123
Copy link

kuit123 commented May 23, 2024

docker-compose.yml,needs to modify Api: environment variables, APP_WEB_URL,SERVICE_API_URL,fill in 'http://ip:nginx expose-port'

@kokojacket
Copy link
Author

Yes my problem is solved now__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants