Install Nginx (Ubuntu) - wollardj/Mandrill GitHub Wiki

Previous: Install NodeJS


Nginx is a very attractive web server which is widely recommended for use with NodeJS applications. But, there are lots of other reasons why you might want to use Nginx, even for web applications other than Mandrill. Perhaps it's obvious, but Nginx is well suited for high-traffic environments such as your Munki repository.

The npm module pm2, is a process manager for NodeJS applications. Requests come in through Nginx and are proxied to a pm2 daemon, Mandrill in this case.

sudo apt-get install nginx
sudo npm install -g pm2

# install startup scripts to make sure pm2 and all its daemons
# respawn when the server reboots.
sudo pm2 startup ubuntu

Next: Configure pm2