Includes again

by John Murray <jmnc(at)lis.net.au>

 Date:  Fri, 5 May 2000 21:05:11 +1000
 To:  hwg-basics(at)mail.hwg.org
 Cc:  Dennis.Lapcewich(at)unisa.edu.au
  todo: View Thread, Original
Dennis and others,

I got a couple of basic questions for you Dennis if you have the time.

I am looking to use server side includes to pull a standard index margin
into all my pages [I don't want to use frames], and to learn a bit more
about server side includes options.


BACKGROUND DATA AND INFO ON MY SERVER AND SITE:
My server is Apache/1.3.3 (Unix) Debian/GNU PHP/3.0.5 [I don't run the
server. I just pay a guy to let me upload pages into a user directory and
cgi-bin on his server]

I've had a page visitor log script provided by the server manager called by
a server side include statement <!--#exec
cmd="/usr/lib/cgi-bin/jmnc/cc_log.pl"--> at the top of files. The files
that contain it all have the file extension ".shtml".

The script cc_log.pl is in my cgi-bin. It's permissions are "-rwxr-xr-x".
It writes the info it slurps about visitors systems to a file called
log.html whose permissions are "-rwxrwxrwx"

How my directory structure presents itself in my ftp program is:

/johnssite
	/cgi-bin
	/public_html

When i do "view file list" in my ftp program I get:

drwx--x--x   2 1272     users        1024 Apr 30 17:57 cgi-bin
drwxr-xr-x  10 1272     users        1024 Apr 18 23:25 public_html

When I navigate in my ftp program into "/johnsite" and type in ".htaccess"
in the "get file" field I "no such file".

When I navigate in my ftp program into "/johnsite/cgi-bin" and type in
".htaccess" in the "get file" field I "no such file".

When I navigate into "/johnsite/public_html" and the same I do find a
htaccess file, the contents of which are:

ErrorDocument 401 /cgi-bin/guardian.cgi?401
ErrorDocument 403 /cgi-bin/guardian.cgi?403
ErrorDocument 404 /cgi-bin/guardian.cgi?404
ErrorDocument 500 /cgi-bin/guardian.cgi?500

[. htaccess is hidden from the view of my ftp program file list (I
understand the "." at the front of the filename makes this happen)]

THE DOCUMENT YOU REFER TO IN REPLY TO RAYNE
The doc you pinted to is here http://www.apache.org/docs/mod/mod_include.html

I've read from "Apache HTTP Server Version 1.3 .... to ... (and the
resulting output given the mime type text/html).

I can change permissions on any of my directories under the "/johnsite"
directory, and any file within /johnsite and directories under. I can
upload any file with any name I want to my directories including
"/johnsite". The server guy does the rest.

QUESTIONS:
1. Given the parameters of:
* what I can do v what my server guy needs to do
* contents of ".htaccess" files
* presence in directory of ".htaccess" files
* file extension alternatives ["shtml" v "html"]
* contents of files
what needs to happen to be able to have server side includes pull a
standard index margin into all my pages?

2. I've read the first bit of "mod_include.html" pointed to above. I am
right track with the following. The Apache server sofware gets downloaded
or transferred to my guys server. He has to pass the files he gets through
as "c" programming language compiler. This is done in an automatic way by
some other under the control of some other file that comes with the
package. This file says "convert the file 'mod_include.c' into code the
computer can execute with all the other files where doing the same unless
the guy installing the thing says otherwise"?

3. What is a "handler" and where on the server computer is the fact that
it's value is "server_parsed" recorded?

4. Are they talking about putting the follwoing lines into an .htaccess file?
AddType text/html .shtml
AddHandler server-parsed .shtml

5. What is a <Directory> section?

6. Where is" AllowOveride Option" set?



Cheers ... John

HTML Guild: hwg-basics mailing list archives, maintained by Web Developer Association - IWA