Re Getting Apache to do server-side includes locally

Re Getting Apache to do server-side includes locally

Post by John Ve » Mon, 02 Jul 2001 04:23:36



There are a number of things wrong with this.

  (1) Add a space before the close of the comment, that is

         s/scm"-->/scm" -->/

  (2) include virtual takes a path relative to the "DocumentRoot"
      if it begins with a "/".  So the path "/home/me/scheme/test.scm"
      would have to be a reasonable path passed to the webserver.  You
may
      wish to use "include file" instead.  (reread the mod_include
docs)

  (3) The include is just a straight content inclusion.  It runs
nothing
       (I'm not entirely certain that it has to be that way, I'm not
sure
       what handlers would get called for an include virtual, but it
would
       take configuration).

      So look at exec instead of include.
===

I fixed all the problems you mentioned.  I added the space, and even
tried to use:

  AddHandler scm

(there were only handlers for cgi and pl) to see if that would maybe
work, but it didn't.  I tried the directive #exec
cgi="absolute-path-to-script" instead of #include but it didn't do it
either.  Doing #exec cmd="ls -a" or something simple like that didn't
work either which tells me Apache isn't running/configured right but I
have no idea what to look for--what could be causing this?

Thanks,
  -- John

 
 
 

1. Getting Apache to do server-side includes locally

Hi,

I'm trying to test a few CGIs (written in Scheme) on my home box.  I
have apache running, as evidenced by ps aux | grep apache:

root      1545  0.1  2.0  5028 2680 ?        S    22:11   0:00
/usr/sbin/httpd
nobody    1546  0.0  2.1  5128 2768 ?        S    22:11   0:00
/usr/sbin/httpd
nobody    1547  0.0  2.1  5128 2768 ?        S    22:11   0:00
/usr/sbin/httpd
nobody    1548  0.0  2.1  5128 2768 ?        S    22:11   0:00
/usr/sbin/httpd
nobody    1549  0.0  2.1  5128 2768 ?        S    22:11   0:00
/usr/sbin/httpd
nobody    1550  0.0  2.1  5128 2768 ?        S    22:11   0:00
/usr/sbin/httpd
nobody    1551  0.0  2.1  5128 2768 ?        S    22:11   0:00
/usr/sbin/httpd
nobody    1552  0.0  2.1  5128 2768 ?        S    22:11   0:00
/usr/sbin/httpd
nobody    1553  0.0  2.1  5128 2768 ?        S    22:11   0:00
/usr/sbin/httpd
nobody    1554  0.0  2.1  5128 2768 ?        S    22:11   0:00
/usr/sbin/httpd
nobody    1555  0.0  2.1  5128 2768 ?        S    22:11   0:00
/usr/sbin/httpd

but when I open a simple HTML page (which ends in .shtml) in Netscape
containing a server-side directive such as:

  <!--#include virtual="/home/me/scheme/test.scm"-->

the output is not shown.  Initially I thought this may be due to the
.scm extension which maybe Apache isn't recognizing since it's not in
the config file, so I tried the same with a simple Perl script (ending
in .pl) and I got the same results.  I also tried ending both scripts
with .cgi which didn't work either.  How can I fix this?

Thanks,
  -- John

2. How to set auto reply mail?

3. getting server side includes to work with apache server

4. BOOTP, please help me

5. Problem getting Server Side Include to work on IBM HTTP Server (Apache Build).

6. NIC Installation Problem

7. Problem getting server side includes working on Apache

8. ksh? where

9. Apache Not Doing SSI (server side includes) WHY???

10. Apache, Server Side Include: include

11. Server-side includes in Apache-1.3.14

12. Help: Server-Side Include on Apache 1.1b2/linux1.3.54