← Back to context

Comment by Levitating

8 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...

But the real question is, does Caddy support it?

The answer is: it does but via community plugins.

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.