On 6 Feb, 08:30, "wiggledbits" <abigdipst...@gmail.com> wrote:
> OK just to make sure I have this correct...
> I have in my httpd.conf file
> # To parse .shtml files for server-side includes (SSI):
> # (You will also need to add "Includes" to the "Options" directive.)
> #
> AddType text/html .shtml
> AddOutputFilter INCLUDES .shtml
> .
> .
> .
> # The Options directive is both complicated and important. Please see
> #http://httpd.apache.org/docs-2.0/mod/core.html#options
> # for more information.
> #
> Options Indexes FollowSymLinks
> Options Includes
>
> in an .htacess file in the root of the site I have
> AddType text/html .shtml
> AddHandler server-parsed .shtml
> Options Indexes FollowSymLinks Includes
>
> Although if I change the date format in the shtml file it doesn't change in
> the output the rest appears to test ok.
> I think I have it all now. Any corrections needed?
>
> "wiggledbits" <abigdipst...@gmail.com> wrote in message
>
> news:12sgc7efcoij27c@corp.supernews.com...
>
> > Just got it going. Yes there were some typos and I got more info from some
> > other links.
> > Thanks again.
> > Oh and it was Centos 4.4.
>
> > "shimmyshack" <matt.fa...@gmail.com> wrote in message
> >news:1170744621.101413.6640@q2g2000cwa.googlegrou ps.com...
> >> On Feb 6, 6:18 am, "wiggledbits" <abigdipst...@gmail.com> wrote:
> >>> I want to get SS includes going on my Apache 2.x but I seem to be
> >>> missing
> >>> something.
>
> >>> I have
> >>> <Directory "/home/web/blah/blah">
> >>> Options +Includes
> >>> AddOutputFilter INCLUDES .shtml
> >>> AddType text/html .shtml
> >>> AddHandler server-parsed .shtml
> >>> </Directory>
>
> >>> I have tried without the + on Includes.
> >>> I have tried these directives in the vhost section.
> >>> I can't get the files parsed. I have a test file
> >>> <html>
> >>> <head>
> >>> <TITLE> Test of SSI </TITLE>
> >>> </head>
> >>> <body>
> >>> <center>
> >>> <h1><!--#config errmsg="mod_include is unable to parse your code!"-->
> >>> Today is <!--#echo var="DATE_LOCAL"-->
> >>> <!--#config timefmt="%B %d, %y"-->
> >>> <!--#include file="include_bttm.html-->
> >>> <!--#include file="/home/web/blah/include_bttm.html>
> >>> </center>
> >>> </body>
> >>> </html>
> >>> and only get "Today is" in the browsers.
> >>> Nothing in the error log and access log shows the GET!??
> >>> What am I missing??
> >>> Thanks.
>
> >> well there are few typos there: try this instead:
>
> >> <html>
> >> <head>
> >> <TITLE> Test of SSI </TITLE>
> >> </head>
> >> <body>
> >> <center>
> >> <h1>
>
> >> <!--#config errmsg="mod_include is unable to parse your code!"-->
>
> >> <!--#config timefmt="%B %d, %Y" -->
> >> Today is <!--#echo var="DATE_LOCAL" -->
>
> >> <!--#include file="include_1.html" -->
>
> >> <!--#include virtual="/ssi/include_2.html" -->
> >> </center>
> >> </body>
> >> </html>
>
> >> you didnt say which OS youre on, do you have the required x bit set?
> >> If not it should work provided the path given in your <Directory "/
> >> path"> is ok.
you shouldnt need the config in an htaccess file as well as the conf,
it all depends how secure you want to be, for just a couple of SSIs I
would turn off htaccess altogether (in fact never use it if you have
httpd.conf control)
use a
<Directory "path/to/where/you/need/SSIs">
Options +Includes
AddHandler server-parsed .shtml
AddOutputFilter INCLUDES .shtml
</Directory>
That should be enough, the + in front of Includes is here in my setup
because I have Includes off globally.
(in other words for the server document root and up includes indexes
etc.. is off, and i turn it on per directory the + overrides the
global setting)
SSIs are a bad thing in general in my opinion as you dont get enough
control of what they spew out unless you start including the output
from programs, be careful of being too loose with permissions SSIs can
be used to execute processes on the server with server permissions.
The time thing is funny, I couldnt get it to control the format
either, although I went to the docs to copy and paste. Not sure why,
perhaps an expert can say! (2.2.4/XP_PRO briefly )