Skip to content

Instantly share code, notes, and snippets.

@hugsbrugs
Created April 25, 2016 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hugsbrugs/5832a009ebeb25f14f453878d1e71cff to your computer and use it in GitHub Desktop.
Save hugsbrugs/5832a009ebeb25f14f453878d1e71cff to your computer and use it in GitHub Desktop.
# Clone repo
git clone https://github.com/prerender/prerender.git
cd prerender
npm install
npm install prerender-redis-cache --save
# Modifi .htaccess (Middleware in prerender vocabulary
https://gist.github.com/thoop/8072354
# Open firewall port
sudo ufw allow 3000/tcp
# Related commands
/ Check apache modules (mod_prox, mod_proxy_html, ...) are loaded
sudo apachectl -M
# Supervisor Section
[program:prerender]
command=bash -c "ulimit -n 10000; exec nodejs /var/www/prerender/server.js"
process_name=prerender
numprocs=1
autostart=true
autorestart=true
user=www-data
stdout_logfile=/var/www/logs/supervisor-prerender-info.log
stdout_logfile_maxbytes=1MB
stderr_logfile=/var/www/logs/supervisor-prerender-error.log
stderr_logfile_maxbytes=1MB
export PRERENDER_SERVICE_URL=<new url>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment