Installing Gproxy on your WEB server

Installing Gproxy on a UNIX World Wide Web server

After installing Gproxy, you should find the following new files in your Host Links binary directory:

     gproxy
     nph_psuh

You should also find a new directory in your Host Links system directory called html, and a directory under that called gproxy.

Step 1: Installing the Gproxy CGI script

Your World Wide Web server has a separate directory for Common Gateway Interface (CGI) scripts. This directory is located inside your WWW server's main directory (often /local/www), and is usually called cgi-bin.

To install Gproxy for use with a UNIX World Wide Web server, you will have to copy the nph-push CGI program into your World Wide Web server's CGI script directory. In the UNIX shell, change the current directory to the WWW server's CGI script directory. Then enter the command:

   cp /usr/gar/bin/nph-push .

Step 2: Adding a link to the Gproxy HTML files

The next thing you do is add a link in your World Wide Web directory structure to the directory where Gproxy stores its HTML files. These are the files which users download into their World Wide Web browsers to make new connections using Gproxy.

Sample files which demonstrate how to set up a Gproxy front page are installed together with Gproxy in the /usr/gar/html/gproxy/ directory. There are different ways of making this directory visible to your World Wide Web server, depending on which server you use. The easiest way is to make a UNIX file system link from somewhere in the World Wide Web server's main document structure to the Gproxy HTML directory.

For example, if you store your network's HTML files in /local/share/www/docs/, and you would like your users to access Gproxy with the URL:

     http://www.mycompany.com/gproxy/
you should make a link from /local/share/www/docs/ to directory /usr/gar/html/gproxy/ by entering the following command in the UNIX shell:
     ln -s /usr/gar/html/gproxy /local/share/www/docs/gproxy

At this point, continue with Step 3: Configuring Server-Side Includes.


Installing Gproxy on a Windows NT World Wide Web server

After installing Gproxy, you should find the following new files in your Host Links binary directory:

     gproxy.exe
     nph-push.exe

You should also find a new directory in your Host Links system directory called html, and a directory under that called gproxy.

The following instructions apply for any World Wide Web server. Some specific instruction for installing and setting up Gproxy with the Microsoft Internet Information Server are included.

Step 1: Installing the Gproxy CGI script

Your World Wide Web server has a separate directory for Common Gateway Interface (CGI) scripts. This directory is located inside your WWW server's main directory, and is usually called cgi-bin.

To install Gproxy for use with a Windows NT World Wide Web server, you copy one of the Gproxy executable files, nph-push.exe, from the Host Links binaries directory into your World Wide Web server's CGI script directory.

Find your World Wide Web server's CGI script directory. Then use the File Manager, Windows Explorer, or command prompt to copy \gar\bin32\nph-push.exe to your WWW server's CGI directory.

Microsoft IIS users: if you are using Microsoft's Internet Information Server, CGI scripts are stored in the \inetpub\scripts directory.

Step 2: Adding a link to the Gproxy HTML files

The next thing you do is add a link in your World Wide Web directory structure to the directory where Gproxy stores its HTML files. These are the files which users download into their World Wide Web browsers to make new connections using Gproxy.

Sample files which demonstrate how to set up a Gproxy front page are installed together with Gproxy in the \gar\html\gproxy\ directory. There are different ways of making this directory visible to your World Wide Web server, depending on which server you use. Please read your World Wide Web server's documentation for help doing this.

Microsoft IIS users: When using Microsoft's Internet Information Server, this can be done in the "Internet Service Manager" program. Launch the "Internet Service Manager" from the IIS group in the Start menu. Select the WWW service from the list of services. From the "Properties" menu, select "Service properties..." Select the "Directories" tab in the dialog box which appears, and click the "Add..." button. In the "Directory" field at the top of the dialog box, enter the path to Gproxy's HTML files (usually c:\gar\html\gproxy). Then select the "Virtual directory" radio button and enter the alias you want to use for Gproxy's files in the "Alias" field. For instance, to be able to refer to Gproxy's HTML files with the URL <http://www.mycompany.com/gproxy/>, you would enter /gproxy in the Alias field. Check off the "Read" checkbox at the bottom of the window, and click OK.


Step 3: Configuring Server-Side Includes

When you run Gproxy in HTML mode (using the parameter -pt html) a number of files will be constantly updated in the directory specified by the -hp path parameter. These files are coded with Server-Side Include (SSI) syntax to include other files. Most web servers has the ability to process SSI files, but they normally have to be configured to do so.

Gproxy by default creates files with a .ssi extension. You must therefore either configure your web server to treat files with this extension as SSI files, or configure Gproxy to use a different extension with the -ssi extension parameter. Note that the HTML pages distributed with Host Links assume SSI and several pages includes SSI extensions (e.g. the help pages).

If your web server is not described below you must look in the documentation for details on how to enable Server-Side Includes.

Telling the Apache server to use SSI

By default, the server does not bother looking in HTML files for the SSI commands. This would slow down every access to a HTML file. To use SSI you need to tell Apache which documents contain the SSI commands.

One way to do this is to use a special file extension. .ssi is often used, and this can be configured with this directive:

   AddHandler server-parsed  .ssi
   AddType    text/html       ssi

The AddHandler directive tells Apache to treat every .ssi file as one that can include SSI commands. The AddType directive makes such that the resulting content is marked as HTML so that the browser displays it properly.

The server also needs to be configured to allow SSIs. This is done with the Options Includes directive, which can be placed in either the global access.conf or a local .htaccess (although the latter must first be enabled with AllowOverride Options). Since some SSI commands let the use execute programs which could be a security risk, an alternative option, IncludesNOExec lets SSI commands work except for any which would execute a program.

Telling Microsoft IIS to use SSI

By default, Microsoft's Internet Information Server is set up to process SSI files. However, the default extension for SSI files are .stm. Either change this extension setting for Microsoft IIS, or use the -ssi extension parameter to Gproxy to force the Microsoft extension.

The configuration for IIS is done via the Registry, There are two registry keys that controls the SSI behaviour, and both are located in the registry subtree

   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\

The keys are listed below:

ServerSideIncludesEnabled (REG_DWORD)
Set to 0x1 (default), this value enables the use of Include files to permit including repetitive information in files.
ServerSideIncludesExtension (REG_SZ)
Specifies the file extension for files that the server will scan for include statements. Default value: .stm

Telling the Netscape Enterprise server to use SSI

Here's how you enable Server-Side Includes for a Netscape Enterprise server:
1. From the Server Manager, choose Content Management|Parse HTML
2. From the Resource Picker, choose the server resource to edit
3. Enable activation of parsed HTML
4. Choose which files to parse
The common (and default) choice is to parse only files with the extension .shtml. You need to the the server to parse files with the .ssi extension instead, unless you specify the Gweb parameter -ssi shtml.