オマエラ wlog

[ all ] [ media ] [ life ] [ meta ] [ tech ]

Gallery (gal) and CGI on nginx

by z411 @ 2016-08-10 [ meta ]

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.

Running FastCGI

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()
Permalink | 17:06

Omaera baby

by z411 @ 2016-07-16 [ meta ]

'sup. I'll be setting this wlog instance up to write about changes in the server and other things I might find.

This is my double VPS and it's running a mail server (postfix), web server (nginx) and XMPP server (prosody) for now. I also plan to install NextCloud soon. XMPP registration is currently open (please use in-line registration) and it implements most modern XEPs. I might open up e-mail accounts after I set up encryption and spam filtering.

This wlog is generated by a simple script I wrote in a few hours (called nikki). It takes Markdown files and generates a simple static blog. It's inspired by 4x13's wlog.

Permalink | 13:33