ba4d8172e35510567beab7b90386509ea8354d1d — retropikzel 2 months ago ccfdfcf
Migrated from codeberg
2 files changed, 41 insertions(+), 0 deletions(-)

A test.fcgi
A README.md => README.md +40 -0
@@ 0,0 1,40 @@
# fcgi-bridge

Program to bridge [Apache mod_fcgid](https://httpd.apache.org/mod_fcgid/)
to SCGI running in certain port.

## Download

Go to latest tag or release, download it and its in the dist/fcgi2-scgi.
It's compiled with Zig and musl c library so that it would work on all
webservers. You are of course welcome to build it yourself too.

## How to

This is only tested on hetzner web host.

Put this into the folder in .htaccess file

    Options +ExecCGI
    SetHandler fcgid-script
    FcgidWrapper /FOLDERS_FULL_PATH/bridge.cgi .scm virtual

Put this into the folder in bridge.cgi file, dont forget to give it execution
permissions (755)


    PORT=$((3000 + $RANDOM % 1000))
    sleep 2
    exec ./fcgi2scgi $PORT --debug

Navigate with your browser to that folder/hello.scm and you should see what
your SCGI server sends. With --debug flag the fcgi2scgi exits after each
request, it's made for development purposes.

A test.fcgi => test.fcgi +1 -0
@@ 0,0 1,1 @@