Comment by Levitating
11 hours ago
CGI is great. Sadly nginx doesn't support it natively as opposed to lighttpd.
I like this project for adding CGI to nginx: https://github.com/pjincz/nginx-cgi
There's also methods of starting Rack applications directly form nginx via passenger[1]. Rack is the CGI like interface for ruby webapps: https://github.com/rack/rack It easily allows for writing applications and middleware with a few lines of ruby.
[1]: https://www.phusionpassenger.com/documentation/Users%20guide...
You can write a ngninx module. That would be the actual 2026 way to write C web apps. Used to be a huge pain, but now AI can just read the nginx source and do it correctly.
I just use lighttpd
I used it for a long time but the configuration of nginx just allows for more stuff.
I have my own configuration template for nginx: https://git.levitati.ng/Levitating/nginx.conf
fastcgi wrap.
Exactly what I used and wonder why the OP didn't. I'll comment at the top.
Ease of configuration, I think? I don't remember my gripes with fcgiwrap exactly.
I have used it and I've even made PR for it which led to a response from the lighttpd maintainer: https://github.com/gnosek/fcgiwrap/pull/62
Essentially I wanted fgciwrap to be able to accept arbitrary response bodies without headers, so I could use it with programs that weren't actually made for cgi. Lighttpd supports this but apparently that's an happy accident.
But the real question is, does Caddy support it?
The answer is: it does but via community plugins.