setting up nginx

Since I’m on a VPS, I decided to up it and switch from Apache2 to Nginx, after all Nginx is so well regarded and fast! Always wanted to try it out.



Instructions on converting a standard digital ocean wordpress installation to nginx.

Difficulty level – Simple. Make sure there are no typocs.

Remember to backup and take snapshots before and after major changes.


Then Google Pagespeed Insights still seemed to report the server as responding slowly ???? so I decided to enable Varnish. Varnish responds to port 80 and serves cached data unless it needs to pull from Nginx on port 8080. Cool. Was fairly easy to install.

Varnish guide

Difficulty level – rather simple


Google Pagespeed Insights

Analyzes website for mobile and desktop optimizations in terms of speed and usability, eg things like minify js, css, caching.


W3 Total Cache

WordPress Plugin that helps to do minifying of js html css, caching. etc. Even interfacing with CDNs if you’re using one. Wow. I had issues with the minify settings, esp the url rewrite.


Pingdom speed test

Helps to test the speed of your page load, size, and even charts it out beautifully.



Google Pagespeed itself has a mindbogglingly awesome server level webpage optimization. It does way too many things to list here. But it’s better integrated with Apache which supports modules. Nginx is real tricky as it can’t be easily built in. I tried really long and it’s very un-beginner friendly. I think I got a test copy working but I got tired of trying to replace the default nginx with this, and I will have to manually keep nginx updated in the future. So maybe I will put this aside for now.

Nginx uses ngx_pagespeed which needs to be custom installed with nginx. offical page here:

Difficulty level – challenging.


Useful commands:

$ netstat -tutpln


setting up nginx

Leave a Reply

Your email address will not be published.