Reputation: 1315
While working with Azure application gateway I am getting 502 error every time, I also configured a VMSS with the application gateway and deployed my service over there I checked on VMSS server and over there everything looks fine I also checked in the Nginx config which also looks fine but every time I open the URL i got the 502 error also when I hit the url of VMSS it always redirect it to localhost.Can anyone please help me on this.
Upvotes: 0
Views: 217
Reputation: 31462
With the messages that you provided, your VMSS instances could be accessible without the Application Gateway. It means the Nginx Server is no problem. So I guess the problem is on the Application Gateway.
Let's analyze it. First, your Nginx config with the location /. So if the VMSS is not associated with the Application Gateway, then you access it with the URL https://privateIp
. If this is right, then you need to set the HTTP settings of the Application Gateway with the port 80 and the override backend path is /
. And create the listener to listen to port 80, create a rule with the listener and the HTTP settings. Create the backend pool the VMSS type and your VMSS.
When everything is OK. You can access the public IP of the Application Gateway, then it would route your request to Nginx hosted in your VMSS. There is no difficulty in the steps.
Well, if there is any more question, please let me know. I'm glad to provide more help.
Upvotes: 0