Skip to content Skip to sidebar Skip to footer

Server Side Includes

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

Solution 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


Post a Comment for "Server Side Includes"