User Tools

Site Tools


python_cgi

This is an old revision of the document!


Python cgi-bin

Zu installieren:

apt install nginx fcgiwrap

Dann in Nginx Config im Serverteil folgendes zufügen:

	}

	location = /cgi-bin/setset.py {
		return 301 /cgi-bin/index.py;
	} 

	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.1702297388.txt.gz · Last modified: 2023/12/11 12:23 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