Gallery (gal) and CGI on nginx
So I installed 4x13's py-gal, a minimalist script inspired by gelbooru community-contributed image galleries. It's simple CGI (Python) and works well so far, might as well use it to archive trash I have scattered on old hard drives.
By the way, nginx is nice. And I mean nice. The way it handles FastCGI is transparent, configuration is simple and the way it works as a proxy makes it pretty clean. For example, a simple FastCGI script (ran as proper FastCGI) would work like this in Python with the flup FCGI module:
#!/usr/bin/env python import os from flup.server.fcgi import WSGIServer def myapp(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) return ['sup.\n'] if __name__ == '__main__': from fcgi import WSGIServer WSGIServer(myapp, bindAddress='/tmp/test.sock').run()