I have a backend that used to be my front end. Now my front end is an nginx proxy server. It just serves as an http and an IMAP/SMTP proxy. The backend services apache,mysql,dovecot/postfix. Since I defined the nameservers to this box on the registrar, do I now define the nameservers to the proxy box? It is located in a different geographical location? If so, what hostname should the backend have? The proxy needs to resolve the MX. Thanks.


By defining nameservers at registrar to this box I assume that you are referring to glue records pointing to the IP(s) of that server. It means that you also have a DNS server running on that box, such as BIND or DNSMASQ. You would need to move that service to the new box.

  • Yes the glue records defined in the registrar and bind is set up on that box. Now I am moving my front end to a proxy. Should the glue records be defined for the new proxy? Also if I do that, what hostname should the backend NOT be? I assume since there aren't any authoritative dns servers on the backend anymore (after moving them to the proxy), that it would not matter since they wont resolve anyway. However my postfix needs to have my official mail exchanger record set up right. My MX record. I see that in nginx.conf, I can set the name server regardless of that physical hostname – pipetosed Apr 9 '14 at 17:20
  • Nameservers have nothing to do with nginx, there is no such thing as a physical hostname and, if you want your proxy to get the emails for the postfix server then the MX records have to be pointed to the proxy. I think that you either need to start reading and learn what you are doing and have to do, either hire a professional. – Florin Asăvoaie Apr 9 '14 at 17:28
  • Let me clarify for you since I don't think you understand what I am asking. On the proxy box, I defined my dns zone to be my authoritative server and have the glue records pointed there. I already know that part. However, what kind of zone is supposed to be configured for the BACKEND? I run bind on the backend, yes or no and just point server_name in nginx.conf to the physical IP of the backend? When i said physical hostname, I am reffering to /etc/hostname. I also am aware I define the MX hostname inside nginx.conf no matter what is listed in /etc/hostname. This serves as reference for MX. – pipetosed Apr 9 '14 at 17:48
  • You don't run DNS on backend. – Florin Asăvoaie Apr 9 '14 at 17:55
  • Thanks. I assumed that's what I needed. However, I should still define /etc/hostname as my MX like mail.example.com on the backend correct? postfix would need this. Finally, for /etc/hostname on the proxy, should that just be something like ns1.example.com? Defining mail.example.com here does not make sense since that is defined INSIDE nginx.conf for our single point of reference for our mail users correct? Really appreciate the clarification – pipetosed Apr 9 '14 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.