Virtualmin in Azure VM. Domains show default /var/www/ apache content

SYSTEM INFORMATION
OS type and version Rocky Linux 9.3
Virtualmin version 7.10.0

Good afternoon everyone,

I’ve been experiencing the following issue for a while now:
I used to have multiple domains hosted on a VPS server configured with Webmin and Virtualmin, and everything worked perfectly.
Later, I had to migrate to the cloud on an Azure virtual machine. The problem I’m encountering is that when the virtual machine is created, it has two network interfaces: one with the public IP and another with the private IP (I’m not sure if it’s on the same physical adapter since I’m unfamiliar with how networks function in that aspect).
I can access the Virtualmin panel by creating the respective ACL rule in Azure. However, when I try to restore the domains I had on the old server, which I migrated using Virtualmin’s backup option, it restores files and everything but once I configure the DNS records because it showed the private IP instead of the public one, the following happens:
Either it shows the content of the /var/www folder for all domains, or it shows the content of the default virtual server. I’ve conducted several tests, first with Rocky Linux 9, then with a VM with CentOS 7 because it was the operating system used on the previous VPS, but I always encounter the same issue.
Additionally, I can’t install letsencrypt SSL certificates because I get something like this:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for domain and 3 more domains

Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: admin.domain
Type: unauthorized
Detail: 52.146.2.95: Invalid response from admin.domain/.well-known/acme-challenge/ZFoTh3SZpeFwOEyN1h5ScyLZ94VSq3PrcA4u8oKIV2o: 404

Domain: webmail.domain
Type: unauthorized
Detail: 52.146.2.95: Invalid response from webmail.domain/.well-known/acme-challenge/RNxZE2G-pvOn2A2vFlId5tX297scqT0GWWNCD4-aNig: 404

Domain: domain
Type: unauthorized
Detail: 52.146.2.95: Invalid response from domain/.well-known/acme-challenge/B-2g86VIK1FO96jLWQMyjrJyT5yExqSJ0QqDyaa3M2w: 404

Domain: domain
Type: unauthorized
Detail: 52.146.2.95: Invalid response from http://domain/.well-known/acme-challenge/Mnpv8xV1-QHzfhfdywzaxvoGaVm4Y5tQcjE927VQZWM: 404

The DNS records are as follows:
domain. IN SOA domain. root.domain. (
2024042157
3600
600
1209600
3600 )
domain. IN A 52.146.2.95
www[dot]domain. IN A 52.146.2.95
ftp[dot]domain. IN A 52.146.2.95
localhost[dot]domain. IN A 127.0.0.1
webmail[dot]domain. IN A 52.146.2.95
admin[dot]domain. IN A 52.146.2.95
domain. IN TXT “v=spf1 a mx ip4:52.146.2.95 include:domain include:zoho.com -all”
ns1[dot]domain. IN A 52.146.2.95 ;ns1 personalizado
ns2[dot]domain. IN A 52.146.2.95 ;ns2 personalizado
domain. IN CAA 0 issuewild letsencrypt.org
_dmarc[dot]domain. IN TXT “v=DMARC1; p=quarantine; pct=100; ruf=mailto:postmaster@domain; rua=mailto:postmaster@domain”

domain. IN NS ns1[dot]domain. ;ns1 personalizado
domain. IN NS ns2[dot]domain. ;ns2 personalizado

and the virtualhost in apache:

I had Cloudflare configured, but I’ve temporarily deactivated it.

I don’t know what else to do since I’ve read several posts and made some changes like switching the private IP to the public one, but I still encounter the same issue. If anyone can guide me on what else I could try, I would appreciate it.