Running NodeJs API with Apache & PM2 on Ubuntu
Use the following steps; 1. Install Apache, Node, NPM using APT 2. Install PM2 using NPM 3. Configure apache to use proxy sudo a2enmod proxy sudo a2enmod proxy_http sudo service apache2 reload 4. Create configuration file for site as /etc/apache2/site-available/webname.conf <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. ...