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

Update reverse-proxy.md #4800

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ArmanTheParman
Copy link
Contributor

exclude mac for network=host

exclude mac for network=host

Signed-off-by: Arman The Parman <77603167+ArmanTheParman@users.noreply.github.com>
Copy link
Collaborator

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, just one comment

@@ -39,7 +39,7 @@ In order to run Nextcloud behind a web server or reverse proxy (like Apache, Ngi

For this setup, you can use as target `host.docker.internal:$APACHE_PORT` instead of `localhost:$APACHE_PORT`. **⚠️ Important:** In order to make this work on Docker for Linux, you need to add `--add-host=host.docker.internal:host-gateway` to the docker run command of your reverse proxy container or `extra_hosts: ["host.docker.internal:host-gateway"]` in docker compose (it works on Docker Desktop by default).

Another option and actually the recommended way in this case is to use `--network host` option (or `network_mode: host` for docker-compose) as setting for the reverse proxy container to connect it to the host network. If you are using a firewall on the server, you need to open ports 80 and 443 for the reverse proxy manually. By doing so, the default sample configurations that point at `localhost:$APACHE_PORT` should work without having to modify them.
In this case, another option, and actually the recommended way, is to use `--network host` option (or `network_mode: host` for docker-compose) as setting for the reverse proxy container to connect it to the host network. Do note that this method is not available on MacOS. If you are using a firewall on the server, you need to open ports 80 and 443 for the reverse proxy manually. By doing so, the default sample configurations that point at `localhost:$APACHE_PORT` should work without having to modify them.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should say that this is not supported on docker desktop in general?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your call, but why? it's only the MacOS version that doesn't support --nework=host.

very annoying, btw, has caused me much headache making my own software compatible for both Mac and Linux

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as far as I know it also does not work on windows and in general on all platforms that use docker deesktop...

Copy link
Collaborator

@Zoey2936 Zoey2936 Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szaimen szaimen added 2. developing Work in progress documentation Improvements or additions to documentation labels Jun 10, 2024
@szaimen szaimen modified the milestone: next Jun 10, 2024
@ArmanTheParman
Copy link
Contributor Author

ArmanTheParman commented Jun 12, 2024 via email

@szaimen szaimen removed this from the next milestone Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants