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

Gemini Mention this log

=> Submit a response URL

Proxy Information
Original URL
gemini://gemini.smallweb.space/gemlog/20220311-scgi-part-2.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
425.494251 milliseconds
Gemini-to-HTML Time
0.583081 milliseconds

This content has been proxied by September (ba2dc).