💾 Archived View for gemini.smallweb.space › gemlog › 20220311-scgi-part-2.gmi captured on 2023-06-14 at 14:01:13. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-05-24)

➡️ Next capture (2024-02-05)

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

SCGI Part II

Some Gotchas

I disabled SCGI on Molly Brown after getting the example running so as not to have an unnecessary attack surface running on my system. Fast forward a couple weeks and now that I've gone through Tomasino's newest video [1] on making a Gemini app, I wanted to fire it up again and try my hand and some user authentication...but it wouldn't work, and I kept getting:

Error connecting to SCGI socket /home/gemini/gemini/socks/scgi.sock: dial unix /home/gemini/gemini/socks/scgi.sock: connect: connection refused

To which I couldnt' figure out. Were the permissions wrong? Did I have the SCGI folder in the wrong spot? NOPE!

Gotcha: Make sure your damn SCGI server is running

That's right folks, I didn't daemonize my program, so when my browser tried to look for the socket listed in my molly.conf, there was *no* program on the other end to respond. So before you daemonize your program, you simply have to fire it up in python:

python3 /scgi-bin/test-scgi-server.py

And done - the response came through.

Gritty

2022-03-11

Tags: SCGI, Python, Molly-Brown