If this is an inappropriate question feel free to delete. Just moved my wife's old legacy site to a new VPS server on almaLinux running cPanel/WHM. I haven't done a lot of customization, things just seem to work except this.
The problem: getting a content-type error from Apache2 when I know the output of this script includes content type headers.
Code:
[Thu Dec 21 10:59:34.717822 2023] [include:error] [pid 738483:tid 23353639089920] [client (ip address)] unable to include potential exec "/cgi-bin/articles_menu.cgi?c=name-of-the-page" in parsed file /home/(user)/public_html/name-of-the-page.shtml, content type not text/*, referer: https://www.(user).com/
Starts here:
Code:
<!--#include virtual="/cgi-bin/articles_menu.cgi?c=name-of-the-page" -->
The script is extremely simple and it works, and has for years, depending on what page you're on it opens and parses a plain text file and skips "name of the page" before outputting the menu like so:
Code:
if ($ENV{'QUERY_STRING'}) {
print "content-type: text/html\n\n";
print "$out";
}
As mentioned I've confirmed this works via cli and you can request the URL from a browser like
Code:
aitch-tee-tee-pea-ess//example.com/cgi-bin/articles_menu.cgi?c=name-of-the-page
When you request that URL, FF Inspector says the output headers are content-type text/html.
I have confirmed indeed $out is populated and working. Appropriate handlers are operational. Both SSI's and scripts are working fine. Reviewed the Apache docs and not seeing anything relevant.
Am I missing an Apache config that addresses "potential exec?" (I doubt that's the problem but . . . ) Does anyone have any ideas where I could look?
A few specs:
cPanel Version 116.0 (build 7)
Apache Version 2.4.58
Perl Version 5.26.3
User Defined Apache Handlers
application/x-httpd-ea-php74 .php .php7 .phtml (This site is pre-PHP, that's how old school it is)
server-parsed .html
server-parsed .shtml .html
System Apache Handlers
cgi-script .cgi .pl .plx .ppl .perl
server-parsed .shtml
Bookmarks