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?

7
  • 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 <!--#include file="header.html" --> Commented Sep 18, 2011 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. Commented Sep 18, 2011 at 14:35
  • Unfortunately, those two suggestions didn't work. Commented Sep 18, 2011 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? Commented Sep 18, 2011 at 15:59
  • Tried Options +Includes, Options Includes -IncludesNOEXEC... none worked. Commented Sep 18, 2011 at 16:16

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

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: control-escape.com/web/configuring-apache2-debian.html

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.