Web Server Setup for Microsoft IIS Servers
The key difference between setting up an SSI Web survey on a Unix server and setting it up on a Microsoft IIS Server is that
the Perl scripts on an IIS server run in the root of the virtual directory. This is very important as it affects the way that
the paths are set up.
If you are hosting your surveys on a dedicated IIS server and you can create your own virtual directories you might consider
setting up a virtual directory for each survey. For additional documentation on how to set up SSI Web on a dedicated IIS
Server please click here.
If you are hosting your surveys on a shared IIS server and you have been given an account with one virtual directory you will
need to host all of your surveys under the same virtual directory. The remainder of this document will assume that you are
setting up a survey on a shared IIS server. This document uses a study name of "stu1" as an example.
1) SETUP YOUR DIRECTORIES AND FILES INSIDE YOUR VIRTUAL DIRECTORY
Virtual Directory (Virtual Root Directory)
stu1path.cgi
cgi-bin (Directory)
ciwweb.pl
admin.pl
cgi-lib.pl
ciwlib.pl
auth-lib.pl
acalib.pl
cbclib.pl
stu1 (Directory)
stu1logn.htm
stu1admn.htm
admin (Directory)
stu1pidx.cgi
stu1p001.cgi
stu1qst.cgi
stu1pacc.cgi
data (Directory)
(any data files will be stored here)
graphics (Directory)
ssilogo.gif
(any graphic files could be stored here)
2) MODIFY PATHS IN CIWWEB.PL AND ADMIN.PL
Modify the ciwweb.pl and admin.pl "include" paths located at the
top of each file. For example,
Change
my($Path_cgilib) = "cgi-lib.pl";
to
my($Path_cgilib) = "cgi-bin/cgi-lib.pl";
(You might see the following error message:
Can't locate cgi-lib.pl in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib.)
This is usually a sign that the Perl scripts are running from the virtual root and not from the CGI-BIN where they are
located. When ciwweb.pl or admin.pl is invoked it runs as if it were in the virtual root directory. Because the main Perl
file is running from the virtual root it cannot find its "included files". To fix this problem check your paths in
ciwweb.pl and admin.pl.)
3) MODIFY SYSTEM PATHS.
Using the SSI Web Authoring System, under File | Settings | Advanced, there are five paths specified:
a) Administrative Directory: This is the path to the admin directory relative to the working directory of the Perl files
(virtual root). For example: stu1/admin/
b) CGI Scripts Directory: This is the path from the STUDYNAMElogn.htm and STUDYNAMEadmn.htm files to the actual location
of the ciwweb.pl and admin.pl files. For example: ../cgi-bin/
(../ means go up one directory)
c) Data Directory: This is the path to the data directory relative to the
working directory of the Perl files (virtual root). For example: stu1/data/
d) Relative Path from CGI Scripts to Graphics: This is the path from the actual location of the Perl files (cgi-bin) to
the graphics folder. For example: ../stu1/graphics/
e) Relative Path from logn.htm to Graphics: For example: graphics/
This path information is stored in the file stu1path.cgi
4) THE FILE stu1path.cgi AND ssilogo.gif MIGHT NEED TO BE PLACED IN THE VIRTUAL ROOT.
Depending on your setup Perl will look in a few different paths to try and find these files. If it cannot find these
files it will always look in the current working directory which in this case is the virtual root.
EXAMPLE
This example has two studies both using the same Perl files.
Advanced Settings Paths for stu1:
admin: stu1/admin/
cgi-bin: ../cgi-bin/
data: stu1/data/
graphics: ../stu1/graphics/
graphics: graphics/
Advanced Settings Paths for stu2:
admin: stu2/admin/
cgi-bin: ../cgi-bin/
data: stu2/data/
graphics: ../stu2/graphics/
graphics: graphics/
Paths for Included Files in ciwweb.pl (the same needs to be done for admin.pl):
my($Path_cgilib) = "cgi-bin/cgi-lib.pl";
my($Path_authlib) = "cgi-bin/auth-lib.pl";
my($Path_ciwlib) = "cgi-bin/ciwlib.pl";
my($Path_acalib) = "cgi-bin/acalib.pl";
my($Path_cbclib) = "cgi-bin/cbclib.pl";
Here is an example directory structure with two studies:
Virtual Root (Directory)
stu1path.cgi
stu2path.cgi
cgi-bin (Directory)
ciwweb.pl
admin.pl
cgi-lib.pl
ciwlib.pl
auth-lib.pl
acalib.pl
cbclib.pl
stu1 (Directory)
stulogn.htm
stu1admn.htm
admin (Directory)
stu1pidx.cgi
stu1p001.cgi
stu1qst.cgi
stu1pacc.cgi
data (Directory)
(any data files will be stored here)
graphics (Directory)
ssilogo.gif
(any graphic files could be stored here)
stu2(Directory)
stu2logn.htm
stu2admn.htm
admin (Directory)
stu2pidx.cgi
stu2p001.cgi
stu2qst.cgi
stu2pacc.cgi
data (Directory)
(any data files will be stored here)
graphics (Directory)
ssilogo.gif
(any graphic files could be stored here)
|
© 2012 Sawtooth Software, Inc. All rights reserved.
|