💾 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

View Raw

More Information

⬅️ Previous capture (2022-04-28)

-=-=-=-=-=-=-

Gemini CGI Example in Python

Message headers

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>

Message content

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

Related

No related messages found.