in reply to OT: Using global SSIs

I may be off on this a little, but from what I remember from way back, the path you use for the 'virtual' clause should be from the server root, not an absolute path on your filesystem. This doesn't explain why it would work in the server root but not in a subdirectory, but maybe I'm right anyway. Try one of these (it should be the first one if chat.cgi is in the server root as you say it is):

# try this one first <!--#include virtual="/chat.cgi"--> # if that doesn't work, maybe this: <!--#include virtual="/cgi/chat.cgi"-->

Replies are listed 'Best First'.
Re^2: OT: Using global SSIs
by Anonymous Monk on Jan 14, 2005 at 06:27 UTC
    The first would would work, I know that without testing. I just have a lot of subfolders and folders inside of subfolders and I'd hate to have to have each SSI statement fixed. Is there no absolute path one?

      Well, this site on Apache SSI's #include offers the file= parameter. Now, this can't be absolute paths, but it can be relative to the physical filesystem (just not '../').

      However, the virtual= parameter allows you to use absolute paths -- it's just that the 'root' is the DocumentRoot, not the filesystem root. If you're using this script with multiple virtual servers on the same machine, you can use a ScriptAlias or Alias in your Apache config to make sure, e.g. that all references to "/chat/" on any virtual host will access "/home/legato/scripts/chat/". Adjust as needed, of course.

      radiantmatrix
      require General::Disclaimer;
      s//2fde04abe76c036c9074586c1/; while(m/(.)/g){print substr(' ,JPacehklnorstu',hex($1),1)}