Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Enabling Server side includes via webmin

Posted on 2007-08-02
Medium Priority
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              
ServerName www.xxxx.xxx                               
ServerAdmin xxx@xxxxxx.xxx                            
ServerAlias xxx.com                                    
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
  • 2
LVL 27

Accepted Solution

Nopius earned 200 total points
ID: 19624693
> 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

ID: 19624908
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

ID: 19624998
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


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

580 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