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

Expose http ports also when SSL is configured #192

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Conversation

fredrikekre
Copy link
Member

This patch changes the nginx configuration to always listen for http requests on port 8000 and forward them to the upstream package server.

In addition, the docker compose configuration is changed to map port 8001 on the host to port 8000 in the container. This make it possible to bypass nginx and connect directly to the package server.

To make use of these ports one needs to be on tailnet or use SSH port forwarding. In the standard configuration ports 8000 and 8001 are both blocked by the firewall so there are no plain http ports exposed to the public.

This patch changes the nginx configuration to always listen for http
requests on port 8000 and forward them to the upstream package server.

In addition, the docker compose configuration is changed to map port
8001 on the host to port 8000 in the container. This make it possible to
bypass nginx and connect directly to the package server.

To make use of these ports one needs to be on tailnet or use SSH port
forwarding. In the standard configuration ports 8000 and 8001 are both
blocked by the firewall so there are no plain http ports exposed to the
public.
@staticfloat
Copy link
Member

I assume this is for some kind of debugging?

@fredrikekre
Copy link
Member Author

Yea -- sometimes nice to be able to reach directly into the PkgServer, and when using tailnet it seems better to use a HTTP endpoint (which is still secure because it isn't public) instead of an insecure HTTPS endpoint (insecure because hostname doesn't match).

@fredrikekre
Copy link
Member Author

Tested on staging.pkg.julialang.org

@fredrikekre fredrikekre merged commit 6df690d into master Nov 27, 2023
4 checks passed
@fredrikekre fredrikekre deleted the fe/ports branch November 27, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants