I’m using Digital Ocean - Ubuntu 14.04 with 1GB RAM, 30GB SSD created a droplet named “box.mydomain.com”
worked fine initially, registrar nameservers point to ns1/ns2.box.mydomain.com and all other admin checks looked good (apart from self-signed cert and optional secure dns)
I found the nginx local conf was corrupted under /etc/nginx/conf.d/local.conf, the primary hostname did not show up properly.
skimming through web_update.py I was able to generate a valid conf file myself and replace it to enable admin panel access.
perhaps $PRIMARY_HOSTNAME is no longer correctly determined causing the file to be corrupt, and if my hostnames are corrupt and the nginx file is regenerated, I will lose access again. Any hints on how I best troubleshoot this?
Please note that until I decided to look into the cause, I had only used the control panels and www/default directory, so I do think there is a bug here somewhere…
EDIT: I believe the cause of the error was adding an A record to point box.mydomain.com to the ip of the digital ocean droplet, this removed box.mydomain.com as the primary hostname ?
EDIT: just adding the CNAME for mail.mydomain.com (toward the FQDN for box.mydomain.com. - notice trailing dot) and creating the www/default/webmail with redirecting index should have been enough to redirect all users that still went to mail.mydomain.com/webmail - I believe I was getting errors because of browser dns cache and should have cleared the cache before continuing with my reconfigurations.