Nginx fails while installing iRedMail (solution)

If you get this error while running the iRedMail install script:

[FAIL] Starting nginx: nginx failed! invoke-rc.d: initscript nginx, action "start" failed. dpkg: error processing package nginx-full (--configure): installed nginx-full package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: nginx-full E: Sub-process /usr/bin/dpkg returned an error code (1) << ERROR >> Installation failed, please check the terminal output. << ERROR >> If you're not sure what the problem is, try to get help in iRedMail << ERROR >> forum:

It's because nginx is arguing with Apache over ports. You need to stop Apache and start the script again, like this:

root@mx:~/iRedMail-1.3.1# service apache2 stop

root@mx:~/iRedMail-1.3.1# bash

That's all.