💾 Archived View for gemini.bunburya.eu › newsgroups › gemini › messages › sub7tv$1r1m$1@gioia.aioe.o… captured on 2022-06-11 at 21:42:03. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-28)
-=-=-=-=-=-=-
From: Martin <martin@datapulp.de>
Subject: Gemini CGI Example in Python
Date: Sun, 13 Feb 2022 16:25:46 +0100
Message-ID: <sub7tv$1r1m$1@gioia.aioe.org>
I implemented the same CGI script I did in Bash again in Python. Well,
this is my first Python script ever, so maybe a professional would do
things different. If it can be improved, just tell me.
gemini://hubbz.de/apps/tls-input-test.py
Attention: Your Gemini browser needs to support client certificates for
authentication. Otherwise you will not be able to use my script.
Lagrange browser at least does so.
As Gemini server I use gmid from Omar Polo. The config for cgi (from my
development server on localhost) is very easy:
server "localhost" {
cert "/home/martin/MP/certs/localhost.crt"
key "/home/martin/MP/certs/localhost.key"
root "/home/martin/MP/root"
cgi "/apps/*"
lang "de"
Attention: The cgi config dir ("/apps/*") needs to be a sub-directory of
root!
Martin
No related messages found.