1

I am trying to parse the output of a CGI script for SSI code.

The simple CGI code is as follows and simply prints one line of SSI code

#!/usr/bin/perlml -w
use strict; 
use CGI qw( :standard );
my $q=new CGI;
print $q->header();
print '<!--#echo var="${HTTP_HOST}" -->';

The SSI code should be executed and not just returned to the browser.

I have enabled the parsing of .cgi scripts by adding the following line to the .htaccess file in the same directory as the script

AddOutputFilter INCLUDES .cgi

My test URL should print some text out. If you view the source of the test page you see the SSI code and not its output meaning that the SSI code has not been executed.

I can't get it to work on this hosting provider but I can in my home installation of Apache.

What is missing/not configured on the hosting provider?

This is running on Apache httpd v2.4.5x

2
  • 1
    I have just found out that the provider is running Litespeed. I assume that this is the problem - this functionality is outside of the capability of Litespeed. I still wonder if there is configuration that can be made to make it work. Aug 21, 2023 at 8:23
  • It's best if you edit this question to be more specific to Litespeed instead of Apache. Also, it might be best if you asked this over at Server Fault, since we really only deal with basic questions about web servers here.
    – dan
    Aug 22, 2023 at 21:18

0

Browse other questions tagged or ask your own question.