I can not configure the python module through the official Nginx Unit documentation?

avpdnepr nginx-forum at forum.nginx.org
Tue Mar 13 17:25:07 UTC 2018

root at instance-1:~# cat /var/www/app/index.py
import sys

def application(environ, start_response):
    body = sys.version.encode("utf-8")
    status = "200 OK"
    headers = [('Content-type','text/plain')]
    start_response(status, headers)
    return body

root at instance-1:~# curl -X PUT -d @/root/unit_json/start.json --unix-socket
/var/run/control.unit.sock http://localhost/
        "error": "Failed to apply new configuration."
root at instance-1:~#

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,279020,279031#msg-279031

More information about the nginx mailing list