[Github Issue] foris: script options to run as FastCGI or CGI
https://github.com/CZ-NIC/turris-os-packages/issues/24
DO NOT EDIT HERE! Copy fromforis: script options to run as FastCGI or CGI, and in subpath of document root, rather than from root
This pull request preserves existing behavior in Foris, but provides user-configurable way to run Foris as CGI instead of as FastCGI server. This pull request requires minor changes to Foris python scripts, documented in https://gitlab.labs.nic.cz/turris/foris/issues/21
After installing the two sets of patches, I have modified my own /etc/config/foris to add the section:
config config 'server'
option fastcgi 0
option scriptname '/foris'
This prevents Foris from intercepting all requests to the server which are not to cgi-bin/luci, which led to much user-confusion troubleshooting why lighttpd.conf modifications were not taking effect. See https://forum.turris.cz/t/web-tool-running-shell-command-in-lighttpd/2952
Moving Foris out of the root means that requests to http:/// result in a 403 Forbidden since nothing is there. This is easily fixed with a simple index.html welcome page with links to Foris and LuCI.
Also included in this pull request is foris-cgi. If this is to be used, var.foris.cgi in lighttpd-dynamic-conf needs to be updated in this patch to the chosen install path for foris-cgi