Installation: Cshell + SSI by telnet + FTP


Here is the environment we use to explain the installation.

Your Web server www.yours.com
Document directory /home/yours/public_html
Directory for Witness Log File /home/yours/public_html/log
Witness Log File name index.wit
Directory for LogWriter.csh /home/yours/cgi_bin
LogWriter LogWriter.csh (Cシェル)
Method to execute LogWriter SSI
  1. Login to www.yours.com by FTP
  2. Put(Copy) LogWriter.csh to /home/yours/cgi_bin

  3. Login to www.yours.com by telnet
  4. Create directory for Witness Log File and counter

    % cd /home/yours/public_html

    % mkdir log

  5. Change permission of the directory

    % chmod 777 log
  6. Change permission of LogWriter.csh

    % cd /home/yours/cgi_bin

    % chmod 755 LogWriter.csh
  7. Execute LogWriter.csh on the server

    % cd /home/yours/cgi_bin
    % ./LogWriter.csh /home/yours/public_html/log/index.wit

    % cat /home/yours/public_html/log/index.wit


    LogWriter.csh writes log record like below

    {+}
    {BDATE:20070529140735}
  8. Create .htaccess
    .htaccess file is generally required on your directory to execute SSI.
    If you already have
    .htaccess, please enter the command below

    % cat /home/yours/public_html/.htaccess

    Command shows:

    AddType text/x-server-parsed-html
    .html
    AddType application/x-httpd-cgi .cgi
    AddType application/x-httpd-cgi .pl
    AddType application/x-sh .sh
    AddType audio/x-midi .mid
    AddType audio/midi .mid


    If you don't have /home/yours/public_html/.htaccess
    , please copy following line to /home/yours/public_html/.htaccess .

    AddType text/x-server-parsed-html
    .html
  9. Write tags into html file

    <HEAD>
    </HEAD>
    <BODY>
    <!--#exec cmd="/home/yours/cgi_bin/LogWriter.csh /home/yours/public_html/log/index.wit"-->


    At this point, if /home/yours/public_html/index.html is accessed, it invokes /home/yours/cgi_bin/LogWriter.csh, and /home/yours/cgi_bin/LogWriter.csh writes log record to index.wit in /home/yours/public_html/log
  10. Access index.html by internet browser.
  11. Move to log directory

    % cd /home/yours/public_html/log
  12. Confirm log records

    % cat /home/yours/public_html/log/index.wit


    Command shows:
    {+}
    {BDATE:20070529140735}
    {+}
    {BDATE:20070529140735}
    {HOST:www.yours.com}
    {IP:202.2.3.1}
    {BROWSER:Mozilla/2.0}
    {URL:http://www.abc.com}


  13. Change permission of Witness Log File and counter

    % chmod 777 /home/yours/public_html/log/index.*

If no log records found in Witness Log File(index.wit), please check follows.

  1. Permission of Witness Log File, 777
  2. Permission of LogWriter.cgi, 755
  3. The path of LogWriter.cgi in html file
  4. Witness Log File ends with .wit
  5. Prefix of index.html has to be matched the prefix defined in .htaccess