Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSI Directives Driving Me Crazy

Status
Not open for further replies.

mtorbin

Technical User
Nov 5, 2002
369
US
Hey all,

For the life of me I can't figure out why SSI won't work. I've checked httpd.conf and mod_include is loading. Here is my directive:

Options +Includes
XBitHack on
AddOutputFilter INCLUDES .shtml
AddType text/html .shtml
AddHandler server-parsed .shtml

Here is the include I'm trying to use:

<!--#echo var='REMOTE_ADDR'-->

I've even go so far as to check that the right permisions (755 or 766) are on the file.

So what gives?

- MT
 
Hmm.....!Did you check if there are any syntax errors in the httpd.conf after you updated it?

Try httpd -t to check the syntax of your updates to the httpd.conf

Lemme know if this works,
Cevilian.
 
Syntax OK

Hmmm.... no problems there.

- MT
 
You don't need the XBitHack directive unless you want all files (regardless of extension) that have their "execute" bit set to be parsed. I also noticed that you are using single quotes. I'm not sure if it makes a difference but you might try double quotes. Have you tried anything other than "REMOTE_ADDR" to see if ssi works at all?

 
That line in the SSI works on a Red Hat box sitting next to me. Funny, it just doesn't work on the Linux server we need it to.

I'll turn off xBitHack now and see if that makes a difference.

- MT
 
Nothing man... is there something in Apache or Linux that I can do to see if everything really is running correctly? I mean, what am I missing? I just don't get it.

- MT
 
I've asked you that very same question. If you use anything else beside "REMOTE_ADDR" does it work? Or is ssi not working at all?

 
Sorry I didn't answer that specifically. Yes, I did try DATE_LOCAL and got no results. I also tried checking the syntax and got no problems there either.

- MT
 
It seems to me that you have everything you need to make it work. It you said it does on another machine so that narrows it down to where you have the directives located. If they are in a directory container, then ssi will only work in that directory. The following directives should be defined globally (in the main section) in order to work throughout the server's realm:

Code:
AddOutputFilter INCLUDES .shtml
AddType text/html .shtml
AddHandler server-parsed .shtml

Options +Includes can be wherever you want ssi to work. If you put it in a directory container, ssi will work for that directory and all its sub-directories.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top