After using a reverse proxy in front of YouTrack I don't receive an upstream anymore.

Hi out there,
I'm using the offical YouTrack Docker image. In the past I generated TLS certificates with openssl and included them in YouTrack via the UI - worked out fine.
Now I placed a nginx reverse-proxy in front of YouTrack and trying to follow the offical documentation (https://www.jetbrains.com/help/youtrack/standalone/Reverse-Proxy-Configuration.html ).

Since the reverse-proxy handles the certificates aswell I disabled the secure-mode.
Now I'm struggling with configure the base-url. The docu says the base-url "is the address of your proxy server" which in my case would be "https://youtrack.domain.dev". The internal adress of the YouTrack container is "0.0.0.0:13002".
For my understanding I need to configure YouTrack to use "0.0.0.0:13002" for my upstream since my reverse-proxy pulling the data from this one. But if I leave the protocol blank YouTrack can't parse the base-url.

I think I have some sort of misunderstanding about the configuration and appreciate all help :-).

Merry christmas,
Philipp

3 comments
Comment actions Permalink

Hello Philipp,

 

Just to clarify have you applied the command mentioned here? https://www.jetbrains.com/help/youtrack/standalone/Reverse-Proxy-Configuration.html#80c2ea81

Base-URL indeed should contain a protocol, you may use https://localhost, but as for the port is 13002 is a host port or a container one? For the docker container, the application listen port inside the container is not changed. That's why it isn't mentioned in the provided command. Instead, you should configure your proxy server to pass all traffic to the host port that is mapped to the application listen port inside the container.

0
Comment actions Permalink

Hi Sergey,
thanks for your fast reply.

Yes, I used the mentioned command.
I'm a bit confused with host and container ports right now, maybe my configuration helps out:

"""
docker run: ... -p 13002:8080
configure: ... configure --base-url=https://0.0.0.0:13002 --secure-mode=disable
reverse-proxy: ... server_name youtrack.domain.dev; set $upstream 0.0.0.0:13002;
"""

Accessing https://youtrack.domain.dev throws a 502 (my reverse proxy handles TLS, workes fine).

 

Thanks in advance,
Philipp

0
Comment actions Permalink

Hello Philipp,

 

Thank you for your reply. 13002 is a port that YouTrack inside a container responses to. Thus you need to configure the following:

1.all requests to your reverse proxy should forward them to port 13002. The full NGINX configuration is here.

2. for base-URL you need to specify URL and port of your reverse proxy (if only it's not standard 443 or 80)

Please let me know if it helps.

0

Please sign in to leave a comment.