Ich habe im WCP Python aktiviert. Es steht dort auch: "Python 3.7.3 ist aktiv".
Ich habe eine html-Datei in httpdocs:
<form action="/cgi-bin/test.py" method="post">
<div class="form-group">
<label for="text">Name</label>
<input type="text" name="name" id="name" placeholder="Name" value="" required autofocus>
</div>
<button type="submit">Anmelden</button>
</form>
Ich habe eine test.py im Verzeichnis httpdocs/cgi-bin
#!/usr/bin/python
# -*- coding: UTF-8 -*-
print("Content-Type: text/plain;charset=utf-8")
print("")
print("Hello World!")
Ich bekomme jedoch immer als Antwort:
502 Bad Gateway nginx
Wenn ich auf eine nicht vorhandenen Python-Datei zugreife, dann kommt: Server Error 4040 Page not Found
D. h. es kann auf die Datei zugegriffen werden, aber halt immer mit "Bad Gateway".
Was muss ich noch tun, um dieses einfache Beispiel zum Laufen zu bringen?
Muss ich mehr tun, als Python im WCP zu aktivieren?
Danke im Voraus für Euer Bemühen.
Peter