'Where to add Custom domain on WordPress hosted on Azure VM behind Azure Front Door?
I have a WordPress website running on Azure VM at http://example.cloudapp.azure.com
I want to do 2 things:
- Add a Custom domain to the website with SSL Certs
- Add an Azure Front Door with Azure VM as a backend. I want access to WordPress on Azure VM through Front Door only.
My question is:
If I add my custom domain at Front Door & associate it with FD fqdn, then how do I configure WordPress settings on Azure VM? Can I have it set up on Azure VM as well as Front Door?
If I mention my custom domain on VM under wordpress settings like wp_options and other settings, will my site work?
When I add my custom domain & SSL certs to Front Door, how do I configure my backend. If I configure it with the same custom domain will it work? And if I configure backend with a public ip of VM, then how do site URLs will work?
Basically, what I want is:
https://example.com to be routed through Azure Front Door to the WordPress hosted on Azure VM.
Solution 1:[1]
On the webserver VM, make sure the domain is properly set/associated/same-as with your actual cloudapp.azure domain (Wordpress settings). Then, run certbot (yes, before Frontdoor). Once you get your certificates and verified your website is not stuck in a redirection loop, goto Frontdoor.
Change your machine's nameservers to Frontdoor's. Then (on frondoor), create your basic DNS records pointing your domain to your webserver's machine IP (WAN).
That should be it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gary Oak |
