David Moreau Simard

2 minute read

Using tengine (an awesome fork of Nginx, check it out), I found that it would cache HEAD requests even when I thought I explicitly told it not to. Here’s the long story short. What I expected to work In the http section of /etc/nginx/nginx.conf: proxy_cache_min_uses 3; proxy_cache_methods GET; proxy_cache_valid 200 10m; proxy_cache_valid 403 404 1m; proxy_cache_path /var/cache/nginx/website/ levels=1:2 keys_zone=website:16m loader_threshold=300 loader_files=200 max_size=20g; Reading the above, I would expect nginx to only cache GET requests, as per configured through proxy_cache_methods after the third hit.

David Moreau Simard

4 minute read

Google recently made waves on the internet when they announced they would now rank favorably sites that were secured by SSL. You could see the tears of joy of the SSL business. Google just gave people an additional incentive to purchase SSL certificates but don’t get me wrong - this is very much a good thing for most sites and the internet in general. Giving in Now, on the technical side of things, it’s not like this blog could benefit from SSL encryption all that much:

David Moreau Simard

5 minute read

I’ve always been a fan of nginx, it was love at first sight. I tend to use nginx first and foremost as a reverse proxy server for web content and applications. This means that nginx sends your request to backend servers and forwards you their response. Some examples of backend servers I use: php5-fpm for PHP gunicorn or wsgi for Python PSGI/Plack or fastcgi for Perl Now, the cool thing is that these backend servers are good at what they do: serve code and applications written in specific languages.