MostlyChris

Thoughts that are my own.

Nginx

There isn’t much information I can present in this post that hasn’t been hashed out somewhere else on the web. I’m just noting the fact that I have now converted two servers to running strictly nginx and shutting down apache.

I did this for a couple of reasons. First, on one of my servers, the load was approaching eight for a four core CPU and things were starting to crawl. This is a very busy server that runs terrabytes of web traffic each month. So far I have seen the load cut in half by running nginx. I have only run this for a couple of days of normal traffic so I’m waiting to see how it averages out. The config is fairly basic with some caching turned on.

http {

    ...

    open_file_cache max=1000 inactive=300s;
    open_file_cache_valid    30s;
    open_file_cache_min_uses 2;
    open_file_cache_errors   off;

    ...

The second reason I did this was for learning. Nginx is becoming more prevelant and I want to make sure I know how it works.

I installed nginx on the second server for more training and to see what it does to Wordpress. I have a couple of Wordpress sites on the server and they are quite slow.

I have used varnish for caching with an apache backend, but I needed to have it serve ssl content which varnish does not do natively. Nginx fits the bill here.

Try it out and of course YMMV.

Comments