Trying to get a clear picture of nginx integration #161
Replies: 2 comments 5 replies
-
Hello @vutsalsinghal ! You are using ip addresses instead of containers name inside your config. This might work for sablier and for whoami because its on network_host. But be aware that I did this in the doc: # A named location that can be used by the sablier middleware to redirect
location @whoami {
# Use variable in order to refresh DNS cache
set $whoami_server whoami;
proxy_pass http://$whoami_server:80;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
} Because containers are getting started, stopped on an endless loop. They will have an IP change, if you do not do that, it will stop working at some point because nginx will keep using the cached IP address. At least that's what I've figured out. |
Beta Was this translation helpful? Give feedback.
-
Actually there is an issue when using groups! The group are not correctly built iinto the request! So there is indeed a bug, are you sure found a solution? Here we can see the group getting retrieved But here Group is not used! So I have to fix that |
Beta Was this translation helpful? Give feedback.
-
Hi @acouvreur
Thank you for this project! I went through all the docs and I'm trying to understand how to integrate it with my existing nginx setup. Would appreciate if you could shed some light
My docker-compose.yml
sablier.yml
nginx.conf
conf.d/personal.conf
sablier.js
is in/etc/nginx/conf.d
in the container.Everything is up and running (no errors). Now the expectation is - if the
whoami_container
is down and I try to visitwho.exmaple.com
, sablier will show status_page while it brings the whoami_container up and then once the container is up, it will reload the browser to the whoami_container. Right?Error in nginx logs
If whoami_container is already running then there is no issue but if I manually stop and try to navigate to the page, nothing happens. Is there any fault in my config?
EDIT: SOLUTION
Updating the following in
conf.d/personal.conf
worked!Question: After the container was up, the url in browser is still
https://who.example.com/dynamic/whoami_container
. How do I make it redirect tohttps://who.example.com
?EDIT: SOLUTION
Updated the following in
sablier.js
Changed
r.internalRedirect(config.internalRedirect);
tor.return(302, config.internalRedirect);
in functioncall()
Beta Was this translation helpful? Give feedback.
All reactions