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 |
-
Login to www.yours.com
by FTP
-
Put(Copy) LogWriter.csh
to /home/yours/cgi_bin
-
Login to www.yours.com
by telnet
-
Create directory for Witness
Log File and counter
% cd /home/yours/public_html
% mkdir log
-
Change permission of the
directory
% chmod 777 log
- Change permission of LogWriter.csh
% cd /home/yours/cgi_bin
% chmod 755 LogWriter.csh
- 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}
- 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
- 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
- Access index.html by internet browser.
- Move to log directory
% cd /home/yours/public_html/log
- 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}
- 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.
-
Permission of Witness Log
File, 777
-
Permission of LogWriter.cgi,
755
-
The path of LogWriter.cgi
in html file
-
Witness Log File ends with
.wit
- Prefix of index.html has to be matched the
prefix defined in .htaccess
|