Hello litespeeder,
I’m trying to run a custom CGI script, that parses conditionally via extension - similar to PHP but not PHP. In my attempt to understand how this all fits together, I first followed this tutorial basically (except on Enterprise version) https://openlitespeed.org/kb/guide-to-openlitespeeds-cgi-setup/
It looks, however, as though this tutorial is geared towards running CGI scripts ‘standalone’ (ie, through abc.com/cgi-bin/script.cgi) rather than parsing separate files through the cgi script based on their extension.
For Apache, I believe that adding the appropriate headers below in .htaccess should have done the trick:
Action cgi-node ../cgi-bin/cgi-node.js
AddHandler cgi-node .jss
But whenever I access the file extension (.jss), it downloads the source code of that file rather than parsing it.
I have also attempted to create an external app with FastCGI in the console and call it in the Script Handler for .jss extensions, here is the external app:
Address: uds://tmp/lshttpd/cginode.sock (just invented this)
Max Conn: 1
Initial Timeout: 60
Retry: 0
Start by server: Yes
Command: /home/cginodetest/www/cgi-bin/cgi-node.js
Instances: 35
Run as: nobody / nogroup
But it seems to load for about 10 seconds and then download the same source file as before...
Files structure:
$VH_ROOT
— cgi-bin
— — cgi-node.js
— public_html
— — .htaccess
— — test.jss
What am I missing here??
Thank you!
I’m trying to run a custom CGI script, that parses conditionally via extension - similar to PHP but not PHP. In my attempt to understand how this all fits together, I first followed this tutorial basically (except on Enterprise version) https://openlitespeed.org/kb/guide-to-openlitespeeds-cgi-setup/
It looks, however, as though this tutorial is geared towards running CGI scripts ‘standalone’ (ie, through abc.com/cgi-bin/script.cgi) rather than parsing separate files through the cgi script based on their extension.
For Apache, I believe that adding the appropriate headers below in .htaccess should have done the trick:
Action cgi-node ../cgi-bin/cgi-node.js
AddHandler cgi-node .jss
But whenever I access the file extension (.jss), it downloads the source code of that file rather than parsing it.
I have also attempted to create an external app with FastCGI in the console and call it in the Script Handler for .jss extensions, here is the external app:
Address: uds://tmp/lshttpd/cginode.sock (just invented this)
Max Conn: 1
Initial Timeout: 60
Retry: 0
Start by server: Yes
Command: /home/cginodetest/www/cgi-bin/cgi-node.js
Instances: 35
Run as: nobody / nogroup
But it seems to load for about 10 seconds and then download the same source file as before...
Files structure:
$VH_ROOT
— cgi-bin
— — cgi-node.js
— public_html
— — .htaccess
— — test.jss
What am I missing here??
Thank you!