Apache24 Ignoring SSI and CGI Directives

I have just upgraded Apache22 to Apache24. The new version will not execute the server side includes (SSI) or common gateway interface (CGI) directives. Nothing has changed regarding the html webpage documents, etc. . . .have been working for over plus ten years.

I have diff'ed both httpd.conf versions for v22 vs. v24, gone through the output line-by-line, and also visually/manually windowed both files side-by-side and looked for signficant differences. I have scanned through /usr/ports/UPDATING and find no mention of a potential problem. I have googled several scenarios of similar failures on different platform such as Linux/Ubuntu, Sparc, et al., but find no suggested solutions that I haven't already tried. For my eyes, I cannot identify any problem. Examination of logs only seem to indicate some kind of internal server error (-0500) . . .at best. I've salted in crude debug code as follows:
Code:
GOT HERE!
<!--#echo var="DATE_LOCAL" -->
. . .or
<!--#include virtual="/cgi-bin/example.cgi?argument=value" -->
. . .the "GOT HERE!" displays, but the SSI/CGI directives are apparently ignored.

I've loaded the usual suspects of modules (as Monty Python might say . . .a plethora of them) but no joy. Only the base html page is rendered. Anyone out there run into this same problem?
 
  • Thanks
Reactions: Oko
. . .well, I lied. I said that I checked everything, but I checked it yet again. This time I found the following discrepancy (never said I was a good proofreader -- that's what my wife's for . . .she's a lawyer).

This code from the v22 http.conf file:

Rich (BB code):
DocumentRoot "/www/vhosts"
#
# This should correspont to what DocumentRoot is set to.
<Directory "/www/htdocs"> . . .this apparently was working with v22
  Options Includes Indexes FollowSymLinks ExecCGI
  AllowOverride All
  Order allow,deny
  Allow from all
  AddHandler type-map var
  DirectoryIndex index.html index.html.var index.php
</Directory>
and this from the v24 httpd.conf file:

Rich (BB code):
DocumentRoot "/www/vhosts"
#
# This should correspont to what DocumentRoot is set to.
# ...per rtw from v22 conf.
<Directory "/www/vhosts"> . . .but v24 wasn't happy with the previous discrepancy, so changed as indicated.
  Options Includes Indexes FollowSymLinks ExecCGI
  AllowOverride All
  Order allow,deny
  Allow from all
  AddHandler type-map var
  DirectoryIndex index.html index.html.var index.php
</Directory>
Now it works!
This just shows to go you how picky picky picky this syntax can be o_O
 
The /usr/ports/UPDATING entry does just refer to the port related side effects of the version bump. There is some implied knowledge that Apache does make changes that could break things between the big version bumps. For that case, you should see "Upgrading to 2.4 from 2.2" from http://httpd.apache.org/docs/2.4/upgrading.html

I had read the Apache page you noted (and have it bookmarked)

Notice the edit colors in my previous post (hope they can stay this time because it is more visually understandable, IMHO) -- the red htdocs entry was the problem . . .but apparently not a problem with v22
 
Back
Top