PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > Simple SSI
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

Simple SSI

Réponse
 
LinkBack Outils de la discussion
Vieux 06/02/2007, 06h18   #1
wiggledbits
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Simple SSI

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.


  Réponse avec citation
Vieux 06/02/2007, 06h50   #2
shimmyshack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Simple SSI

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
Vieux 06/02/2007, 07h40   #3
wiggledbits
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Simple SSI

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
Vieux 06/02/2007, 08h30   #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
Vieux 06/02/2007, 08h58   #5
shimmyshack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Simple SSI

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 )

  Réponse avec citation
Vieux 06/02/2007, 19h33   #6
wiggledbits
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Simple SSI

My use of the directives was mostly for testing. My intent is to use ssi for
some header and footer includes. I do not plan on implementing the XBitHack.

I was thinking I should be able to add the content of the .htaccess file
into the vhost config section. I prefer to have this allowed only where it
is used.

Thanks.

"shimmyshack" <matt.farey@gmail.com> wrote in message
news:1170752314.344288.187030@j27g2000cwj.googlegr oups.com...
> 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 )
>



  Réponse avec citation
Vieux 06/02/2007, 22h43   #7
shimmyshack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Simple SSI

On 6 Feb, 19:33, "wiggledbits" <abigdipst...@gmail.com> wrote:
> My use of the directives was mostly for testing. My intent is to use ssi for
> some header and footer includes. I do not plan on implementing the XBitHack.
>
> I was thinking I should be able to add the content of the .htaccess file
> into the vhost config section. I prefer to have this allowed only where it
> is used.
>
> Thanks.
>
> "shimmyshack" <matt.fa...@gmail.com> wrote in message
>
> news:1170752314.344288.187030@j27g2000cwj.googlegr oups.com...
>
> > 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 )


yes you can add it to your vhosts section, but how about creating a
"httpd-directory.conf" config file, cos you will get more and more of
these rulesets, in this conf file have all the directory blocks in
"file system alphabetic order"
<Directory "/path/to/here/"></Directory>
then
/path/to/there/
/yet/another/path/

and so on - neat.
you include the httpd-directory.conf from the main httpd.conf by using

Include conf/httpd-directory.conf

It turns out that this is one of the biggest config files.

  Réponse avec citation
Vieux 06/02/2007, 23h53   #8
wiggledbits
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Simple SSI

Yes thanks for the reminder, that is how we did it where I used to work. For
each v-domain we created a conf file and just included it from httpd.conf.
We'd name them domainName.mydomain.httpd.conf. Really s to keep the Oh
$%!* I edited the wrong section mistakes.

Joe

"shimmyshack" <matt.farey@gmail.com> wrote in message
news:1170801822.682588.124820@l53g2000cwa.googlegr oups.com...
> On 6 Feb, 19:33, "wiggledbits" <abigdipst...@gmail.com> wrote:
>> My use of the directives was mostly for testing. My intent is to use ssi
>> for
>> some header and footer includes. I do not plan on implementing the
>> XBitHack.
>>
>> I was thinking I should be able to add the content of the .htaccess file
>> into the vhost config section. I prefer to have this allowed only where
>> it
>> is used.
>>
>> Thanks.
>>
>> "shimmyshack" <matt.fa...@gmail.com> wrote in message
>>
>> news:1170752314.344288.187030@j27g2000cwj.googlegr oups.com...
>>
>> > 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 )

>
> yes you can add it to your vhosts section, but how about creating a
> "httpd-directory.conf" config file, cos you will get more and more of
> these rulesets, in this conf file have all the directory blocks in
> "file system alphabetic order"
> <Directory "/path/to/here/"></Directory>
> then
> /path/to/there/
> /yet/another/path/
>
> and so on - neat.
> you include the httpd-directory.conf from the main httpd.conf by using
>
> Include conf/httpd-directory.conf
>
> It turns out that this is one of the biggest config files.
>



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h52.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,36205 seconds with 16 queries