V2: Is it still possible to serve script output without a separate cgi server?

In V1 I could use http.cgi to run a simple bash/perl/python script and serve the output without having to deal with a reverse proxy and making sure the other server is always running.

Is this still possible in V2, or do I now need a separate cgi server to be running at all times, hooked up via a reverse proxy? I feel like this adds an additional “moving part” that shouldn’t be necessary for really simple stuff like having an endpoint to print some kind of stats or serve a random file from a directory

cgi was an third party plugin. It would need to be ported to Caddy v2.

It looks like it was archived, so it’s now unmaintained.

@jung just wondering, what’s the story there? Would you consider porting the plugin to v2?

1 Like

Unfortunately, circumstances prevent me from porting the CGI plugin to version 2 and then maintaining it. However, this is a very simple plugin as the Go standard library does all of the real work. As I remember, the bulk of the code is spent parsing the configuration and I believe this has been greatly simplified for version 2. This could be announced by the Caddy team as a good first-time contributor project.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.