# Apache24 Ignoring SSI and CGI Directives



## rtwingfield (Jun 23, 2015)

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:

```
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?


----------



## rtwingfield (Jun 23, 2015)

. . .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:


```
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:


```
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


----------



## junovitch@ (Jun 24, 2015)

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


----------



## rtwingfield (Jun 24, 2015)

junovitch said:


> 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


----------

