Discussion: Simple SSI
Afficher un message
Vieux 06/02/2007, 09h30   #4
wiggledbits
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Simple SSI

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" <abigdipstick@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.farey@gmail.com> wrote in message
> news:1170744621.101413.6640@q2g2000cwa.googlegroup s.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.
>>

>
>



  Réponse avec citation
 
Page generated in 0,06428 seconds with 9 queries