Set up proxy

Install build essentials then:

aptitude install -y libapache2-mod-proxy-html libxml2-dev

Enable apache modules:


Then it will ask you for the names of the modules that you want to enable:

proxy proxy_ajp proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html

Then your vhost file will look like this:

<VirtualHost *:80>
   ProxyRequests off
   ProxyPass / http://localhost:2368/
   ProxyPassReverse / http://localhost:2368/  
   # DocumentRoot /srv/www/
   # ErrorLog /srv/www/
   # CustomLog /srv/www/ combined

Load balancing

Running ghost forever

To install forever type npm install forever -g

To start Ghost using forever from the Ghost installation directory type NODE_ENV=production forever start index.js

To stop Ghost type forever stop index.js

To check if Ghost is currently running type forever list