Enabling Server side includes via webmin

Posted on 2007-08-02
Last Modified: 2013-12-16
Hi, Im using an Apache-AdvancedExtranetServer/1.3.22

Actually, Im accessing this server through a webhost using webmin and the account is rather restricted in how Im allowed to modify the apache settings (I have to use Webmin for modifications).

What Id like to is enable server side includes on selected files.

Ive tried a number of things but nothing yet works (details below).

First, I have a test file called banner.html that looks like this:
Presumably this should give me the local time when I call the file.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!--#echo var="DATE_LOCAL" -->
<br />

Through webmin my apache directives look like this:
(the most relevant directives are the bottom 3)

DocumentRoot /home/xxxx/yyyyy/html              
ErrorLog logs/xxxxx/error_log                            
RefererLog logs/xxxxxx/referer_log                        
AgentLog logs/xxxxx/browser_log                          
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"  ..  
LogFormat "%h %l %u %t \"%r\" %>s %b" common              
LogFormat "%{Referer}i -> %U" referer                    
LogFormat "%{User-agent}i" agent                          
CustomLog logs/xxxxxx/access_log "combined"                
ErrorDocument 404 /error2.html                            
Options Includes                                          
XBitHack on                                              
AddHandler server-parsed .html                  

I have tried various combinations of the bottom 3 directives

XBitHack on

Options Includes
AddHandler server-parsed .html
XBitHack off

#here my file was called banner.shtml
Options Includes
AddType text/html .shtml
AddHandler server-parsed .shtml

None of these configurations cause my ssi to be parsed (as judged by viewing the source code of the rendered page).

Also, I know that *other* changes to the directives *will* take effect.
e.g. if I change the 404-error page to a_new_page.html, then a_new_page.html is rendered upon a 404 error.

Also, I do have the execution bits for banner.shtml set to on for user, group and others


Is there some configuration setting that Im missing?
What *should* be the proper configuration?
Is it possible that my web-host does not have mod_include enabled?
      How likely is this (I can see no way to load the mod_include module myself from Webmin)?

Question by:pdanese
    LVL 27

    Accepted Solution

    > Is there some configuration setting that Im missing?

    Everything seems OK. But I have some questions:
    In what httpd.conf section you define these directives (VirtualHost/Global/Directory/...)?

    Do you see any errors in apache logfile when reloading apache with your config or when accessing such documents?

    > What *should* be the proper configuration?
    You have proper configuration. There may be problems when you have multiple 'AddHandler' or 'SetHandler' directives in the same config. If you have entire config, please post it here.

    > Is it possible that my web-host does not have mod_include enabled?
    In that case server wouldn't recognize handler 'server-parsed' in config and you can see errors in a logfile when apache is booting.

    Author Comment

    unfortunately, I don't have access to the logs (don't ask).

    but I did figure out the problem.

    the web-min console is set up to have a collection of default directives.  apparently I can't change these even though web-min makes it look as though I can make the changes.

    I have to create a second set of directives pointing to the *same* directory (don't know why) and include my SSI commands in this newly created list.

    then everything works fine, but it took me 4 hours to figure this out.

    thanks for the response
    LVL 27

    Expert Comment

    Thank you for points, pdanese.

    What about your problem, that's why I prefer to use VPS instead of shared webhosting :-) You have no full control over your server...


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
    JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now