Admin Panel not reachable, nginx down?

Today I updated my MiaB to version 0.06 and after the update I cannot reach ANY of the web-based services. I have a strong suspicion that nginx is down. Restarting doesn’t work neither does re-updating work. What can I do to diagnose?

I am not an expert in linux so when asking to post logs/imgs please elaborate what command to use.


sudo nginx -t

and let me know.


root@box:~# sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

That’s ok then. Restarting nginx should be possible:

sudo service nginx restart

Also try running the status checks from the command line:

cd mailinabox
sudo management/

Restarting seems to work, still cant reach the admin panel

root@box:~# sudo service nginx restart
 * Restarting nginx nginx                                                    [ OK ]
root@box:~# cd mailinabox
root@box:~/mailinabox# sudo management/

✓  SSH disallows password-based login.
✓  System software is up to date.
✓ exists as a mail alias [=>]
✓  The disk has 24.4 GB space remaining.

✓  Outbound mail (SMTP port 25) is not blocked.
✓  IP address is not blacklisted by
✓  Nameserver glue records are correct at registrar. [ns1/ => 999.999.999.999]
✓  Domain resolves to box's IP address. [ => 999.999.999.999]
✓  Reverse DNS is set correctly at ISP. [999.999.999.999 =>]
✓  The DANE TLSA record for incoming mail is correct (
✓ exists as a mail alias [=>]
✓  Domain's email is directed to this domain. [ => 10]
✓ exists as a mail alias [=>]
✓  Domain is not blacklisted by
✓  DNSSEC 'DS' record is set correctly at registrar.
✓  Nameservers are set correctly at registrar. [;]
✓  Domain's email is directed to this domain. [ => 10]
✓ exists as a mail alias [=>]
✓  Domain is not blacklisted by

All checks out it seems to me

Edit: btw. IP and mydomain were correct here, changed it for security reasons OFC

What happens when you try to reach the admin panel?

I have tried multiple ways all resulting in the same error:
Connection refused

Tried via 2 PC’s on different networks and also via a VPS in the same network. On the VPS I tried wget and got also connection refused.

What about wget from the box’s own command line?

Sounds like maybe it’s a firewall issue. On the box:

sudo ufw status | egrep "Status|80|443"


root@box:~# sudo ufw status | egrep "Status|80|443"
Status: active
80                         ALLOW       Anywhere
443                        ALLOW       Anywhere
80 (v6)                    ALLOW       Anywhere (v6)
443 (v6)                   ALLOW       Anywhere (v6)


wget -O -

(run on the box)?

Once again:

root@box:~# wget -O -
--2015-01-11 15:19:05--
Connecting to failed: Connection refused.

This is very strange. nginx is running, but it is not listening for incoming connections? Let’s see if it’s really listening-

sudo netstat -lp -A inet

It perhaps is listening only on ipv6.


root@box:~# sudo netstat -lp -A inet
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address  State   PID/Program name
tcp        0      0 localhost:8952          *:*              LISTEN  1323/nsd
tcp        0      0 *:smtp                  *:*              LISTEN  11348/master
tcp        0      0 localhost:953           *:*              LISTEN  7391/named
tcp        0      0 localhost:8891          *:*              LISTEN  8027/opendkim
tcp        0      0 *:sieve                 *:*              LISTEN  11245/dovecot
tcp        0      0 *:imaps                 *:*              LISTEN  11245/dovecot
tcp        0      0 localhost:10023         *:*              LISTEN  1403/ -
tcp        0      0 localhost:10025         *:*              LISTEN  8278/perl
tcp        0      0 localhost:10026         *:*              LISTEN  11245/dovecot
tcp        0      0 *:submission            *:*              LISTEN  11348/master
tcp        0      0 localhost:11211         *:*              LISTEN  1435/memcached
tcp        0      0 localhost:10222         *:*              LISTEN  8995/python3
tcp        0      0 localhost:domain        *:*              LISTEN  7391/named
tcp        0      0  *:*              LISTEN  1323/nsd
tcp        0      0 *:ssh                   *:*              LISTEN  1271/sshd
udp        0      0 localhost:11211         *:*                      1435/memcached
udp        0      0 localhost:domain        *:*                      7391/named
udp        0      0  *:*                      1323/nsd
udp        0      0      *:*                      1934/ntpd
udp        0      0     *:*                      1934/ntpd
udp        0      0 localhost:ntp           *:*                      1934/ntpd
udp        0      0 *:ntp                   *:*                      1934/ntpd

If nginx is running, it’s not listening on HTTP or HTTPS. There might be an error in the logs (tail /var/log/syslog or tail /var/log/nginx/error.log immediately after running sudo service nginx restart).

Tried to find something related to nginx for over 20 times now, after restarting etc.
Nothing is even mentioned in the logs about anything while restarting nginx.

Nothing there to find :S

Well, I would recommend starting over on a new machine e.g. at Digital Ocean, where I know the image you get works OK. If you have mail on the existing machine, you can just copy over the /home/user-data directory.

Same exact problem… Using digital ocean…

1 Like

Weird… I haven’t been able to fix it yet and I have been too lazy to migrate my server. The mailserver is still running perfectly just the adminpanel that is down. I’ll wait for the next update and see if that fixes it.

I am btw also hosted @digitalocean

I have updated to version 0.07 and that changed nothing for me. I now have set up a new droplet with a fresh install. Moved my /home/user-date to the new droplet and it works like a charm again. I have not be able to find any clues why it failed.

I had same issue and found the cause, the nginx config file was missing the primary domain config section as I had messed up my custom DNS settings. I pasted the primary domain config section from the nginx config templates directory on github while putting my primary domain in place and was able to use the admin panel to remove the offending DNS entries. familiarity with nginx config files is required to apply this fix.

I flagged my topic as resolved: