M
M
Maxim2021-08-05 21:38:53
Nginx
Maxim, 2021-08-05 21:38:53

How to configure nginx to proxy on two ports?

Good day to all!
I have a Nexus OOS repository set up, I hung it on the loopback interface, and the admin panel is available at 127.0.0.1:8081
After which I set up nginx on the same server, fastened the certificate and made a proxy_pass for all incoming connections on port 443 on 127.0.0.1: 8081

And everything would be fine, but when I raised the repository in the nexus, the port accordingly opened on the loopback interface, 127.0

. works.
I need access to port 8123 to be also via https (so that gitlab-runner works fine)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2021-08-05
@Far2k

is it possible to somehow configure proxying to the second port, I tried to add a second location, but it does not work.

You can, that's how it works - you specify different proxy_pass`s in different server blocks/locations. Try again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question