Maxim of the day
#12: Forget less. Keep a scheduled agenda.
nginx reverse proxy with caching
Playing around and searching the web I enabled some decent caching now.
Here are some stats: image+html and php. Note that the php on apache (recompiled each request, about 1.5-2sec between every request) versus the cached output has a huge difference. Difference between images and static text files aren’t that huge. Also note that nginx has gzip enabled. The downside is that nginx caches all pages (HTTP code 200) for one hour and isn’t notified when pages are modified (yet).
nginx reverse proxy IP
The issue with the wrong IP address being shown when using nginx as reverse proxy can easily be solved with mod_rpaf.
vs
cache.blog.tuinslak.org 85.12.6.171 - - [22/May/2010:16:27:40 +0200] “GET /2010/05/nginx-reverse-proxy/ HTTP/1.0” 200 22639 “-” “Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.53 Safari/533.4” 1771 23031
nginx reverse proxy
I’ve been playing around a bit with nginx and its reverse proxy module. The “real” website is accessible here, whereas the cached version is here.
I’m deliberately making a difference between cache.* and live.* as blog.tuinslak.* might move to the cached version lateron.
The question, is it useful to reverse proxy this blog? No, probably not. But meh… It’s fun. :)
IP differences between both versions: live vs cache°. I’m guessing as most of the stats (Google Analytics and WP Stats) are JavaScript based, all stats should still be correctly generated. Only the Apache logs show the nginx proxy IP address. Which is normal, I guess.
Maxim of the day
#11: Avoiding doing a minimum; even if you are not motivated.
iRail
Let me remind you, iRail is NOT affiliated with the NMBS/SNCB in any way.
This website was created during my spare time (and mainly for myself). It is also maintained during my spare time. NMBS/SNCB never helped to create or maintain this website (nor did it show any interest to do so).
I never got paid (or earned any kind of money) for this website. The website is free to access from any device (but it’s built to be used on an iPhone or iPad).
Maxim of the day
#10: Study!


