@At_Libitum: why did you reverse-proxy calibre's sub-URLS instead of using a URL prefix as described in
http://manual.calibre-ebook.com/server.html, e.g.
http://foo.bar.com/library or as in the manual,
http://foo.bar.com/calibre? The way you did it ensures that the main calibre page will not be visible and will create maintenance problems if calibre's URLs are ever extended. Using a URL prefix eliminates both problems.
Also, you should add /ajax.