Redirect requests to specific path to different backend port

Oscar Bergenbrink 0 Reputation points
2025-03-05T08:51:04.7233333+00:00

Hi.

We have an application gateway and then one host in the backend pool. We have a listner on 443 and then a rule which sends that traffic over to the backendpool on a specific port. However, there's a chat in the backend application which wants to do some connections on another port when you send a request to /websocket. We have tried to make this work with: another backend setting which has the other port. And then a path-based rule with "path = /websocket*, Target name = websocket, Backend setting name = name of the other backend setting, Backend pool = our 1 and only pool".

When I have the "normal" rule as highest prio, all normal operations work but the /websocket requests are not treated differently, and when I change the path-based rule to have a higher priority I get a invalid gateway error.

To sum it up the goal is:
Rule 1 = send 443 requests to backend
Rule 2 = send /websocket to same backend but with a specified port

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,136 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.