You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no other issue that already describes my problem.
Describe the Bug
When used in a load balanced situation with two nodes and a load balancer, the public_url env var breaks the load balance config.
server 1 is addressed as mysite-1.mydomain.org
server 2 is addressed as mysite-2.mydomain.org
The LB is addressed as mysite.mydomain.org.
In the Directus config, I've set the public_url to mysite.mydomain.org. This works for the customer facing site and the email invitations. This setup fails when attempting to reach the -1, -2 sites directly. This is essential as the load balancer health check attempts to reach the downstream servers by their -1, -2 addresses.
Essentially we can run the site without health checks and everything works, or we can enable health checks as is our policy and the site breaks. The load balancer isn't able to get a response from the health check endpoints, and therefore has no active downstream servers to route to.
Lastly, I set the public_url variable to / and everything worked as expected. The load balancer health checks worked, and the site was reachable at all three addresses. I thought this was the solution, until I tried to invite a member of my team to the site and the links in the email were all just relative links prefixed with /
I would suggest separating thi public_url variable into public_url and host_url, or something along those lines to allow the use of / as the site host and still have mysite.mydomain.org in the email prefix and other areas where that would be used.
To Reproduce
Deploy a site to two or more servers, with a loadbalancer. Assign the servers addresses, and assign the loadbalancer an address. Set the public_url env var to the value of the load balancer address. Ensure health checks are off. The site should work as expected, but the two direct addresses will not work.
Set the public_url value to /, and the site should be working as expected. Invite someone to the site, and check the email links. The links will not be complete.
What version of Directus are you using?
9.0.0-rc76
What version of Node.js are you using?
14.15.3
What database are you using?
SqlServer
What browser are you using?
Chrome
What operating system are you using?
Windows
How are you deploying Directus?
On premise with IIS
The text was updated successfully, but these errors were encountered:
Preflight Checklist
Describe the Bug
When used in a load balanced situation with two nodes and a load balancer, the
public_url
env var breaks the load balance config.server 1 is addressed as
mysite-1.mydomain.org
server 2 is addressed as
mysite-2.mydomain.org
The LB is addressed as
mysite.mydomain.org
.In the Directus config, I've set the
public_url
tomysite.mydomain.org
. This works for the customer facing site and the email invitations. This setup fails when attempting to reach the-1
,-2
sites directly. This is essential as the load balancer health check attempts to reach the downstream servers by their-1
,-2
addresses.Essentially we can run the site without health checks and everything works, or we can enable health checks as is our policy and the site breaks. The load balancer isn't able to get a response from the health check endpoints, and therefore has no active downstream servers to route to.
Lastly, I set the
public_url
variable to/
and everything worked as expected. The load balancer health checks worked, and the site was reachable at all three addresses. I thought this was the solution, until I tried to invite a member of my team to the site and the links in the email were all just relative links prefixed with/
I would suggest separating thi
public_url
variable intopublic_url
andhost_url
, or something along those lines to allow the use of/
as the site host and still havemysite.mydomain.org
in the email prefix and other areas where that would be used.To Reproduce
Deploy a site to two or more servers, with a loadbalancer. Assign the servers addresses, and assign the loadbalancer an address. Set the
public_url
env var to the value of the load balancer address. Ensure health checks are off. The site should work as expected, but the two direct addresses will not work.Set the
public_url
value to/
, and the site should be working as expected. Invite someone to the site, and check the email links. The links will not be complete.What version of Directus are you using?
9.0.0-rc76
What version of Node.js are you using?
14.15.3
What database are you using?
SqlServer
What browser are you using?
Chrome
What operating system are you using?
Windows
How are you deploying Directus?
On premise with IIS
The text was updated successfully, but these errors were encountered: