0

I got the following error message in the Apache log:

unable to include potential exec "header.html" in parsed file /Users/sikusiku/Sites/ss-git/homepage.shtml

I basically tried to include header.html from homepage.shtml. I used the very basic directive in homepage.html (both header.html and homepage.shtml are located in the document root):

<!--#include virtual="header.html" -->

I think I have properly turned on the SSI in my httpd.conf:

Options Indexes FollowSymLinks ExecCGI Includes
...
AddType text/html .shtml
...
# XBitHack doesn't have anything to do with this, but I added it anyway.
XBitHack on

Did I miss anything? Does the included file i.e. header.html need to be configured differently?

moey
  • 10,587
  • 25
  • 68
  • 112
  • 1
    You don't need the XBitHack when you've named the file shtml. And if the header.html is in the same directory like the shtml, just do a – ott-- Sep 18 '11 at 14:33
  • Try virtual="/header.html". Otherwise; the error seems to imply some permission error. Try to chmod the header.html to not be executable. – Gerben Sep 18 '11 at 14:35
  • Unfortunately, those two suggestions didn't work. – moey Sep 18 '11 at 15:51
  • One other thing that's different at my site: I have "Options +Includes" in the apache config. Has the error message in the logfile changed? – ott-- Sep 18 '11 at 15:59
  • Tried `Options +Includes`, `Options Includes -IncludesNOEXEC`... none worked. – moey Sep 18 '11 at 16:16
  • What's the message in the apache error log now? Same or different? – ott-- Sep 18 '11 at 16:27
  • Sorry, I have another directive in the config: AddHandler server-parsed .shtml .html – ott-- Sep 18 '11 at 16:30

1 Answers1

1

I just fixed this problem myself on ubuntu sever 11.10 with apache2.

my /etc/apache2/sites-available/default file:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

I changed AllowOverride None to All in /var/www directory directive.

my .htaccess file in /var/www/.htaccess:

Options +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

finally i made sure that include.load was in the mods-enabled folder this is to load the mod_includes.so module.

sudo ln -s /etc/apache2/mods-available/include.load /etc/apache2/mods-enabled/include.load

That creates a symbolic link to the include.load in mods-available.

finally restart apache

sudo service apache2 restart

That made it work for me, hope you get it working as well.

-- Thomas

tFlolo
  • 43
  • 1
  • 8
  • Note: ubuntu / debian apache2 has a different config pattern then the stock apache2. this can make a big difference in how something is configured see: http://www.control-escape.com/web/configuring-apache2-debian.html – Jim Ford Oct 22 '14 at 15:09