On 2024-10-19, kasak <ka...@kasakoff.net> wrote: > hello misc! > > I know that apache has it's own module for cgi execution, but > unfortunately, it works only with mpm_prefork module.
There are two: mod_cgi (what you're talking about) and mod_cgid (uses a seoarate daemon and works with a multithreaded MPM). > So, the question is: is it possible to forward requests to slowcgi? > > I've tried this configuration ( basically this is a copy of similar > php-fpm option ) > ><VirtualHost *:80> > ServerName gw.kasakoff.net > DocumentRoot /var/www/htdocs/gw > > Alias "/dhcpd-leasesd/" "/var/www/dhcpd-leasesd/" > > <Directory "/var/www/dhcpd-leasesd"> > SetHandler "proxy:unix:/var/www/run/slowcgi.sock|fcgi://localhost" > Require ip 192.168.0. > </Directory> ></VirtualHost> > > And slowcgi -dv -p/ > > mx$ doas slowcgi -dv -p/ ... > slowcgi: env[24], > SCRIPT_FILENAME=proxy:fcgi://localhost/var/www/dhcpd-leasesd/dhcpd-leasesd ... > slowcgi: fork: proxy:fcgi://localhost/var/www/dhcpd-leasesd/dhcpd-leasesd > slowcgi: wait: proxy:fcgi://localhost/var/www/dhcpd-leasesd/dhcpd-leasesd > > unfortunately this does not work due to errors: > > Oct 19 08:01:24 mx slowcgi[25467]: cannot chdir to > proxy:fcgi://localhost/var/www/dhcpd-leasesd: No such file or directory > Oct 19 08:01:24 mx slowcgi[25467]: execve > proxy:fcgi://localhost/var/www/dhcpd-leasesd/dhcpd-leasesd: No such file > or directory I've not tried this, but it looks like you should be able to construct a SCRIPT_FILENAME variable suitable for slowcgi (containing just the path to the script without proxy:fcgi://localhost) by using ProxyFCGISetEnvIf. (Not relevant for you as you have -p/ but for someone else finding this post, if chroot()ing to the default /var/www, the chroot prefix will need to be stripped from the path to the script in SCRIPT_FILENAME). -- Please keep replies on the mailing list.