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

Cannot access to the assigned docker container port #764

Open
farhadmammadli opened this issue Mar 9, 2021 · 3 comments
Open

Cannot access to the assigned docker container port #764

farhadmammadli opened this issue Mar 9, 2021 · 3 comments
Labels
kind/feature-request Issue requesting a new feature kind/question Issue that might be transferred to Discussions

Comments

@farhadmammadli
Copy link

farhadmammadli commented Mar 9, 2021

Hi!
Read the documentation carefully, but unfortunately could not found a way to assign any custom port.
Basic-usage

How to assign custom http port to a container on run command? Traditional "docker run -p 8080:80 ..." syntax does not forward proxy to the app, so cannot access from the https://sub.domain.com:8080.
However, I can access the app just by visiting https://sub.domain.com.

@buchdag
Copy link
Member

buchdag commented Mar 12, 2021

Hi.

nginx-proxy isn't really meant to work with different published ports on a per proxied container basis.

You can publish the 80 and 443 ports of the nginx-proxy container to different ports on the host (let's say 8080 and 8443), but then you won't be able to use the companion as the http-01 challenge used to validate your ownership of the domains you request certificate for won't work over anything else than default 80/443 ports, and there isn't anything we can do to bypass this.

@buchdag buchdag added kind/feature-request Issue requesting a new feature kind/question Issue that might be transferred to Discussions labels Mar 12, 2021
@farhadmammadli
Copy link
Author

farhadmammadli commented Mar 13, 2021

Thanks for the reply, so I need another (sub)domain if I wanna serve any other dockerized web app?
What about support of path like https://sub.domain.com/app1 or https://sub.domain.com/app2

@buchdag
Copy link
Member

buchdag commented Mar 13, 2021

Thanks for the reply, so I need another (sub)domain if I wanna serve any other dockerized web app?

Yep, that's how nginx-proxy is meant to be used. If want to serve three different dockerized apps on the same host, you'll need three different (sub)domains.

What about support of path like https://sub.domain.com/app1 or https://sub.domain.com/app2

That's currently not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request Issue requesting a new feature kind/question Issue that might be transferred to Discussions
Projects
None yet
Development

No branches or pull requests

2 participants