JORDAN.YELLOZ.me

This site has undergone some minor technology changes for some reasons.

I liked Varnish as a caching proxy server but it did not offer SSL and my stunnel setup was suboptimal. There is no reliable way to insert a X-Forwarded-Proto header into the request so there were non-trivial issues with the portions of this site that require secure connections (bad redirects, URLs, …). HTTP proxying isn’t perfect in that regard. I didn’t want to run 2 HTTP servers in ruby (one for this site and one for some other application running on here).

I switched from varnish to cherokee server so that I can serve HTTP and HTTPS from the same server and learn how to use a new web server. It’s quite an interesting product and has a nice administrative interface. The most confusing part is the inheritance regarding document roots and how the document root applies when using a CGI-style handler (I still don’t know how that works). I tried out its FastCGI handler initially and there were lots of problems and weird behavior so I switched to SCGI which seems to work without any known problems. Obviously I miss out on the HTTP object caching of varnish but I get I/O caching and gzip compression for static files combined with easy administration.

Another thing I couldn’t figure out in cherokee is how to promote a user from plain HTTP to part of the site that requires HTTPS using redirects. I seem to only be able to restrict or generate a custom error. There are no back references to the hostname that I know of so I can’t generate a URL in an extensible fashion.

Returning to the back-end, I switched from Mongrel instances to rack with the SCGI handler which is a very interesting thing to do. I’ll see how well it works.

Posted on

Revisions: