User Tools

Site Tools


python_cgi

Python cgi-bin

Zu installieren:

apt install nginx fcgiwrap

Dann in Nginx Config im Serverteil folgendes zufügen:

	
	location /cgi-bin/ {
		gzip off;
		root  /usr/lib;
		fastcgi_pass  unix:/var/run/fcgiwrap.socket;
		include /etc/nginx/fastcgi_params;
		fastcgi_param SCRIPT_FILENAME  /usr/lib$fastcgi_script_name;
	}

Python Dateien dann in /usr/lib/cgi-bin ablegen, cgi muss in Python Datei importiert werden mit:

import cgi
python_cgi.txt · Last modified: 2023/12/11 12:25 by admin

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki