Enabling Server Side Includes in Apache2.2

Enabling Server Side Includes in Apache2.2

am 17.12.2009 17:52:16 von gregory.greene

--_000_559118BA300F3F45AC547BC9E4FD7D9918C1438B45SKATEadunhe du_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Can anyone help a new user of Apache2.2? I'm trying to enable SSI on the s=
erver but don't seem to
be having much luck. I've looked on google and in the FAQ and put into pla=
ce what seems to be fairly
straightforward edits but it never works. Hoping someone can point me in t=
he right direction.

Here's what I put in my httpd.conf file:


Options Indexes FollowSymLinks Includes

AllowOverride None

Order allow,deny
Allow from all

AddType text/html .html
AddOutputFilter INCLUDES .html
AddType text/html .htm
AddOutputFilter INCLUDES .htm


I also tried experimenting with the XBitHack directive but it didn't help e=
ither. Beginning to wonder if
my HTML code to include is just not in the right format. It did work when =
I ran this webserver on
Windows 2003 Server but perhaps it's not compatible with Apache/Linux. Her=
e is the line I'm looking
to include:



I have a bunch of galleries of images in a directory structure in /var/www/=
html. Do you have to define
each and every one in the httpd.conf file? I tried doing that for one gall=
ery but it didn't work either.

Any thoughts? Thanks in advance.

Greg

--_000_559118BA300F3F45AC547BC9E4FD7D9918C1438B45SKATEadunhe du_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

hemas-microsoft-com:office:word" xmlns=3D"http://www.w3.org/TR/REC-html40">












0.0pt;
font-family:Arial'>Can anyone help a new user of Apache2.2?  I’m
trying to enable SSI on the server but don’t seem to >



0.0pt;
font-family:Arial'>be having much luck.  I’ve looked on google a=
nd in
the FAQ and put into place what seems to be fairly
=



0.0pt;
font-family:Arial'>straightforward edits but it never works.  Hoping
someone can point me in the right direction.



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>Here’s what I put in my httpd.conf file: >



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'><Directory "/var/www/html"> span>



0.0pt;
font-family:Arial'>    Options Indexes FollowSymLinks Includ=
es



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>    AllowOverride None
<=
/font>



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>    Order allow,deny
ont>



0.0pt;
font-family:Arial'>    Allow from all
t>



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>    AddType text/html .html pan>



0.0pt;
font-family:Arial'>    AddOutputFilter INCLUDES .html o:p>



0.0pt;
font-family:Arial'>    AddType text/html .htm an>



0.0pt;
font-family:Arial'>    AddOutputFilter INCLUDES .htm :p>



0.0pt;
font-family:Arial'></Directory>



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>I also tried experimenting with the XBitHack directive b=
ut
it didn’t help either.  Beginning to wonder if
=



0.0pt;
font-family:Arial'>my HTML code to include is just not in the right
format.  It did work when I ran this webserver on
font>



0.0pt;
font-family:Arial'>Windows 2003 Server but perhaps it’s not compatibl=
e
with Apache/Linux.  Here is the line I’m looking n>



0.0pt;
font-family:Arial'>to include:



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'><!-- #include file=3D"game.htm" -->=



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>I have a bunch of galleries of images in a directory
structure in /var/www/html.  Do you have to define
font>



0.0pt;
font-family:Arial'>each and every one in the httpd.conf file?  I tried
doing that for one gallery but it didn’t work either.   p>



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>Any thoughts?  Thanks in advance.   =



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>Greg









--_000_559118BA300F3F45AC547BC9E4FD7D9918C1438B45SKATEadunhe du_--

Re: Enabling Server Side Includes in Apache2.2

am 17.12.2009 18:07:13 von Charan

try this



AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes .html
AddType text/html .shtml
AddType text/html .htm
AddOutputFilter INCLUDES .shtml
AddHandler type-map var
Order allow,deny
Allow from all


On Thu, Dec 17, 2009 at 8:52 AM, Greene, Gregory w=
rote:
> Can anyone help a new user of Apache2.2?=A0 I=92m trying to enable SSI on=
the
> server but don=92t seem to
>
> be having much luck.=A0 I=92ve looked on google and in the FAQ and put in=
to
> place what seems to be fairly
>
> straightforward edits but it never works.=A0 Hoping someone can point me =
in
> the right direction.
>
>
>
> Here=92s what I put in my httpd.conf file:
>
>
>
>
>
>   =A0 Options Indexes FollowSymLinks Includes
>
>
>
>   =A0 AllowOverride None
>
>
>
>   =A0 Order allow,deny
>
>   =A0 Allow from all
>
>
>
>   =A0 AddType text/html .html
>
>   =A0 AddOutputFilter INCLUDES .html
>
>   =A0 AddType text/html .htm
>
>   =A0 AddOutputFilter INCLUDES .htm
>
>

>
>
>
> I also tried experimenting with the XBitHack directive but it didn=92t he=
lp
> either.=A0 Beginning to wonder if
>
> my HTML code to include is just not in the right format.=A0 It did work w=
hen I
> ran this webserver on
>
> Windows 2003 Server but perhaps it=92s not compatible with Apache/Linux.=
=A0 Here
> is the line I=92m looking
>
> to include:
>
>
>
>
>
>
>
> I have a bunch of galleries of images in a directory structure in
> /var/www/html.=A0 Do you have to define
>
> each and every one in the httpd.conf file?=A0 I tried doing that for one
> gallery but it didn=92t work either.
>
>
>
> Any thoughts?=A0 Thanks in advance.
>
>
>
> Greg



--=20
Thanks,
Charan

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Enabling Server Side Includes in Apache2.2

am 17.12.2009 18:26:25 von Justin Pasher

Greene, Gregory wrote:
>
>
>
> Options Indexes FollowSymLinks Includes
>
> AllowOverride None
>
> Order allow,deny
>
> Allow from all
>
> AddType text/html .html
>
> AddOutputFilter INCLUDES .html
>
> AddType text/html .htm
>
> AddOutputFilter INCLUDES .htm
>
>

>
> I also tried experimenting with the XBitHack directive but it didn’t
> help either. Beginning to wonder if
>
> my HTML code to include is just not in the right format. It did work
> when I ran this webserver on
>
> Windows 2003 Server but perhaps it’s not compatible with Apache/Linux.
> Here is the line I’m looking
>
> to include:
>
>
>

Make sure all of the following are true:

1. The file that contains the SSI directive actually ends in .htm or
..html (per your config)
2. The file is located under /var/www/html
3. The includes module (include_module) is being loaded in your config.

Try checking your apache error log too to make sure it's not complaining
about anything.

--
Justin Pasher

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

RE: Enabling Server Side Includes in Apache2.2

am 17.12.2009 18:54:00 von gregory.greene

I tried what Charan suggested but it didn't work either. In answer to what=
Justin asked, yes, my files that contain the SSI are in either .htm or .ht=
ml. The files are in a subdirectory structure below /var/www/html. Do=20
I have to specify the absolute directory path in the httpd.conf? I have a=
=20
bunch of gallery directories and that would be a pain to be honest. =20

The one thing I don't know about is the include_module. This is a Red Hat =
R5 Linux install configured as a webserver. Is the include_module compiled
into Apache by default? The RH install really didn't offer much in the way=
=20
of customizations. One thing I did do was to add these lines around the=20
code in the httpd.conf file. I didn't realize they were needed=
..=20




Is there a way for me to tell if that module is enabled. Even with that in
the httpd.conf it still doesn't work.=20

Greg
=20

>Make sure all of the following are true:
>
>1. The file that contains the SSI directive actually ends in .htm or=20
>.html (per your config)
>2. The file is located under /var/www/html
>3. The includes module (include_module) is being loaded in your config.
>
>Try checking your apache error log too to make sure it's not complaining=20
>about anything.
>
>--=20
>Justin Pasher

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Enabling Server Side Includes in Apache2.2

am 17.12.2009 19:31:15 von Justin Pasher

Greene, Gregory wrote:
> I tried what Charan suggested but it didn't work either. In answer to what Justin asked, yes, my files that contain the SSI are in either .htm or .html. The files are in a subdirectory structure below /var/www/html. Do
> I have to specify the absolute directory path in the httpd.conf? I have a
> bunch of gallery directories and that would be a pain to be honest.
>
> The one thing I don't know about is the include_module. This is a Red Hat R5 Linux install configured as a webserver. Is the include_module compiled
> into Apache by default? The RH install really didn't offer much in the way
> of customizations. One thing I did do was to add these lines around the
> code in the httpd.conf file. I didn't realize they were needed.
>
>
>

>
> Is there a way for me to tell if that module is enabled. Even with that in
> the httpd.conf it still doesn't work.
>

I can't give specifics for httpd under RHEL, but you're looking for a
line that is similar to this:

LoadModule include_module /usr/lib/apache2/modules/mod_include.so

To determine which modules are loaded into the server (both static and
dynamic), run "httpd -M". The directive simply checks to make
sure the module is loaded before attempting to set the directives within it.

Make sure you check your Apache logs too for any errors or notifications.

--
Justin Pasher

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

RE: Enabling Server Side Includes in Apache2.2

am 17.12.2009 19:56:32 von gregory.greene

I found the loadmodule line in the httpd.conf file and confirmed that it is=
also listed out using httpd -M. I've got no errors in the logfile. It's =
like it just ignores the include code. I found something on a google searc=
h
about changing the double quotes in the include line to single quotes but
that didn't help. I also used the addhandler directives that were an older
usage but that didn't work either. =20

Not really sure what's going on. Not much to go on. I would really like t=
o=20
avoid going back to a Windows server. =20

Greg

>I can't give specifics for httpd under RHEL, but you're looking for a=20
>line that is similar to this:
>
>LoadModule include_module /usr/lib/apache2/modules/mod_include.so
>
>To determine which modules are loaded into the server (both static and=20
>dynamic), run "httpd -M". The directive simply checks to make=20
>sure the module is loaded before attempting to set the directives within >=
it.
>
>Make sure you check your Apache logs too for any errors or notifications.
>
>--=20
>Justin Pasher

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

RE: Enabling Server Side Includes in Apache2.2

am 17.12.2009 20:25:06 von imedina

--8323329-1049036738-1261077909=:3951
Content-Type: TEXT/PLAIN; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8BIT


> Is there a way for me to tell if that module is enabled. Even with that in
> the httpd.conf it still doesn't work.

Just type /etc/init.d/apache -l to get a list of modules.


iñigo

>
> Greg
>
>
>> Make sure all of the following are true:
>>
>> 1. The file that contains the SSI directive actually ends in .htm or
>> .html (per your config)
>> 2. The file is located under /var/www/html
>> 3. The includes module (include_module) is being loaded in your config.
>>
>> Try checking your apache error log too to make sure it's not complaining
>> about anything.
>>
>> --
>> Justin Pasher
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

--8323329-1049036738-1261077909=:3951
Content-Type: text/plain; charset=us-ascii


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
--8323329-1049036738-1261077909=:3951--

RE: Enabling Server Side Includes in Apache2.2

am 17.12.2009 20:57:17 von gregory.greene

I've been trying different things that I run across on google searches but =
so far nothing seems to work. It seems so simple yet is beyond me right
now. My latest attempt had me adding a wildcard to the path in the directo=
ry line but it didn't help. =20

Current config:



Options Indexes FollowSymLinks IncludesNoExec
AllowOverride None
AddType text/html .html
AddOutputFilter INCLUDES .html
AddType text/html .htm
AddOutputFilter INCLUDES .htm
Order allow,deny
Allow from all
XBitHack on


Options Indexes FollowSymLinks IncludesNoExec
AddType text/html .html
AddOutputFilter INCLUDES .html
AddType text/html .htm
AddOutputFilter INCLUDES .htm
AllowOverride None
Order allow,deny
Allow from all
XBitHack on



greg


-----Original Message-----
From: Greene, Gregory [mailto:gregory.greene@unh.edu]=20
Sent: Thursday, December 17, 2009 1:57 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] Enabling Server Side Includes in Apache2.2

I found the loadmodule line in the httpd.conf file and confirmed that it is=
also listed out using httpd -M. I've got no errors in the logfile. It's =
like it just ignores the include code. I found something on a google searc=
h
about changing the double quotes in the include line to single quotes but
that didn't help. I also used the addhandler directives that were an older
usage but that didn't work either. =20

Not really sure what's going on. Not much to go on. I would really like t=
o=20
avoid going back to a Windows server. =20

Greg

>I can't give specifics for httpd under RHEL, but you're looking for a=20
>line that is similar to this:
>
>LoadModule include_module /usr/lib/apache2/modules/mod_include.so
>
>To determine which modules are loaded into the server (both static and=20
>dynamic), run "httpd -M". The directive simply checks to make=20
>sure the module is loaded before attempting to set the directives within >=
it.
>
>Make sure you check your Apache logs too for any errors or notifications.
>
>--=20
>Justin Pasher

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

RE: Enabling Server Side Includes in Apache2.2

am 17.12.2009 21:46:59 von gregory.greene

Wanted to say thank you to all the people who offered help. I was finally
able to figure it out. It was the space between the to this:


?

Zach

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org