Remix.run Logo
▲ Levitating 6 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...

▲synergy20 5 hours ago | parent | next [-]

I just use lighttpd

▲Levitating 3 hours ago | parent [-]

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

▲huijzer 5 hours ago | parent | prev | next [-]

But the real question is, does Caddy support it?

The answer is: it does but via community plugins.

▲BirAdam 6 hours ago | parent | prev [-]

fastcgi wrap.

▲assimpleaspossi 3 hours ago | parent [-]

Exactly what I used and wonder why the OP didn't. I'll comment at the top.

▲Levitating 3 hours ago | parent [-]

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.