title: How to set up endpoints within a Azure Virtual Machine
body: <p>I'm trying to set up <a href="https://github.com/Mailtrain-org/mailtrain/tree/development" rel="nofollow noreferrer">MailTrain (a newsletter application)</a> on an Azure VM. I created a resource group with the virtual machine, a virtual network, a network interface, a network security group, a public ip adress and a private DNS zone.</p>
  <p>MailTrain expects three URL endpoints which all point to the same IP adress. For testing purposes I would like to create internal endpoints which all point to the VM. I played around with DNS entries in the DNS zone, but it doesn't work as I expected.</p>
  <p>The name of the private DNS zone is equal to the DNS name of the VM's public IP adress. The private DNS zone and the VM are linked with the virtual network link and auto registration is enabled. The virtual network contains a default subnet. I created an A entry for &quot;lists&quot; pointing to the VM's internal IP adress and a CNAME entry for &quot;sbox&quot; pointing to the DNS name of the public IP adress. Inbound rules for the ports 80 and 443 were added to the netwwork security group.</p>
  <p>The console shows me the following message while running the installation script:</p>
  <pre><code>Domain: lists.xxx.cloudapp.azure.com
  Type:   None
  Detail: DNS problem: NXDOMAIN looking up A for
  lists.xxx.cloudapp.azure.com - check that
  a DNS record exists for this domain
  
  Domain: sbox.xxx.cloudapp.azure.com
  Type:   None
  Detail: DNS problem: NXDOMAIN looking up A for
  sbox.xxx.cloudapp.azure.com - check that a
  DNS record exists for this domain
  
  Domain: xxx.cloudapp.azure.com
  Type:   unauthorized
  Detail: Invalid response from
  https://xxx.cloudapp.azure.com/.well-known/acme-&gt;challenge/VIjYMd-Uic_T2lQBl4vSyy9Va46-yVxmTA8SSE3f8J8
  [xxx.xxx.xxx]: &quot;&lt;!DOCTYPE HTML PUBLIC \&quot;-//IETF//DTD HTML
  2.0//EN\&quot;&gt;\n&lt;html&gt;&lt;head&gt;\n&lt;title&gt;503 Service
  Unavailable&lt;/title&gt;\n&lt;/head&gt;&lt;body&gt;\n&lt;h1&gt;Service&quot;
  </code></pre>