Azure application gateway + App service (Deployment)
Posted: 2023-08-16 07:26
I have a problem with the appgini application deployed in the azure web app + application gateway. I sometimes got http error 502. I am also getting the re-direction to the original url (xxx.azurewebsite.net) after login. I suspect the 502 error probably due to configuration that is not end-to-end SSL (https://example.com -> http://xxx.azurewebsite.net)
I want to address the issues or redirect after login first.
By default, the web app will have a default domain name xxx.azurewebsites.net.
My setup will be:
custom domain (example.com) -> application gateway -> backend pool (xxx.azurewebsite.net).
I can access to example.com but after login in, the page is redirected to xxx.azurewebsite.net.
I checked the phpinfo, the server_name and http_host are defaulted to xxx.azurewebiste.net.
Moreover, I found the function application_url() in admin/incFunction.php also depend on http_host and server_name.
My idea is to change to $host = config('host') instead in application_url() function.
However I am unsure whether there are php environment variables such as http_host and Server_Name in other appgini files.
Is this the proper way to have custom domain setup up via the routing using application gateway with app service?
Does anyone have any experience on hosting in azure with application gateway and app service?
I want to address the issues or redirect after login first.
By default, the web app will have a default domain name xxx.azurewebsites.net.
My setup will be:
custom domain (example.com) -> application gateway -> backend pool (xxx.azurewebsite.net).
I can access to example.com but after login in, the page is redirected to xxx.azurewebsite.net.
I checked the phpinfo, the server_name and http_host are defaulted to xxx.azurewebiste.net.
Moreover, I found the function application_url() in admin/incFunction.php also depend on http_host and server_name.
My idea is to change to $host = config('host') instead in application_url() function.
However I am unsure whether there are php environment variables such as http_host and Server_Name in other appgini files.
Is this the proper way to have custom domain setup up via the routing using application gateway with app service?
Does anyone have any experience on hosting in azure with application gateway and app service?