This is an old revision of the document!
Mercurial
Install
apt install mercurial uwsgi-core uwsgi-plugins-all
UWSGI
Test
Application
foobar.py
def application(env, start_response): start_response('200 OK', [('Content-Type','text/html')]) return [b"Hello World"]
Server
uwsgi --plugins http,python3 --http :9090 --wsgi-file foobar.py
Client
$ telnet 127.0.0.1 9090 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. HEAD / HTTP/1.0 HTTP/1.0 200 OK Content-Type: text/html Hello World
Run it
#! /bin/bash #LOG exec 2>&1 ulimit -l unlimited ulimit -i unlimited ulimit -q unlimited ulimit -n 8192 ulimit -aH #RUN export TZ="UTC" exec /bin/uwsgi --plugins http,python3 --http :9090 --master --processes 4 --threads 2 --uid=www-data --gid=www-data --wsgi-file /var/www/cgi-bin/hgweb.wsgi