This page looks best with JavaScript enabled

iRedMail with NGINX and a Remote Database

 ·  ☕ 1 min read

Background

Installing iRedMail on a fresh/clean server is a relatively easy process; however, if you want to use NGINX as your web server and/or a remote database it takes a bit more work. This post shows how I adjusted iRedMail to use NGINX and a remote (Postgres) database.

Details

Things to add:

  • /etc/uwsgi/apps-enabled/iredadmin.ini
  • /etc/nginx/sites-available/iredmail

Notes

  • At one point I was getting “broken pipe” (read from the unix socket was being reset). This was caused by incorrect location settings within NGINX; however, I did change to a TCP socket setup between NGINX and uWSGI. To do this, your uwsgi_pass in NGIX should be similar to uwsgi_pass 127.0.0.1:3031; and your uwsgi definition would have the corresponding socket=127.0.0.1:3031. My setup is all local so there is no need for the extra overhead of using TCP which is why I ultimately went back to a unix socket.
Share on

drad
WRITTEN BY
drad
Sr. Consultant