Enabling SelfService Access via a Remote Web Server

From support-works
Revision as of 08:46, 10 April 2015 by Rickyf (talk | contribs) (Created page with "{{Template:Basic Cover |title=Enabling SelfService Access via a Remote Web Server |type=FAQ |htl=Y }} {{Template:Basic Status |status=Published |version=1.0 |authors=HTL QA |...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search



Status: Published
Version: 1.0
Authors: HTL QA
Applies to: Supportworks ESP

Enabling SelfService Access via a Remote Web Server

This document gives you details of how to make SelfService work via a Web server installed on a machine other than the main Supportworks server. This will still be the Web server supplied with Hornbill Core Services, but it will now be running on the remote machine as well - in all likelihood outside of your organisation's firewall (probably within a DMZ) and specifically for the use of SelfService.

The procedure is in two stages, the first of which involves basic preparatory actions on the Supportworks server and database.

Stage 1: Preliminaries

  1. Within a Supportworks client, select Administration > Manage SelfService Configurations and create/configure a new SelfService instance to be used for the remote server. (Note that its name should be all lower case.)
  2. You now need to grant a suitable user account access to the Supportworks database system. This account will be used to establish the ODBC connection from the remote Web server to the cache database, sw_systemdb, and to the application database if that is also on SwSQL. To grant such access (and to create the account in the first place if it does not already exist), run Interactive SQL and enter the following statements:
    USE mysql;
    GRANT SELECT ON *.* TO remote-user@IP-address-of-remote-server IDENTIFIED BY password;
    FLUSH PRIVILEGES;
    EXIT;
    You can omit IDENTIFIED BY password if a password for the account already exists.
  3. If you are using a third-party database management system (rather than SwSQL) in which to store your Supportworks application data, ensure that it, too, has an account by which the remote Web server will be able to establish an ODBC connection.

Stage 2: Remote Server Setup

  1. Install Hornbill Core Services on the remote server. It is recommended that you use the same installation path for this as the Core Services path you have on the Supportworks server installation. The following instructions will assume that the default installation path is C:\Program Files\Hornbill.
  2. Copy the following folder contents and individual files (as indicated) from the Supportworks server to the remote server, creating the relevant folder paths on the latter where necessary:
    • C:\Program Files\Hornbill\Supportworks Server\html\_selfservice\SelfService-instance\
    to
    C:\Program Files\Hornbill\Core Services\SwHTTPServer\HtDocs\sw\SelfService-instance\
    (where SelfService-instance is the name of the SelfService instance you created at the beginning of Stage 1)
    • C:\Program Files\Hornbill\Supportworks server\html\_phpinclude\
    to
    C:\Program Files\Hornbill\Core Services\SwHTTPServer\phpincludes\
    • C:\Program Files\Hornbill\Supportworks Server\bin\php\php_sw.dll
    to
    C:\Program Files\Hornbill\Core Services\SwHttpServer\phpextensions\
    • C:\Program Files\Hornbill\Supportworks Server\Conf\SwServerService.xml
    to
    C:\Program Files\Hornbill\Supportworks Server\Conf\
    • C:\Program Files\Hornbill\Supportworks Server\data\_dd_data\
    to
    C:\Program Files\Hornbill\Supportworks Server\data\_dd_data\
  3. On both servers, stop the SwSqlServer service.
  4. On the Supportworks server, look in the folder C:\Program Files\Hornbill\Core Services\SwSqlServer\data\sw_systemdb\.
  5. From that folder, copy the three files system_timezones.* to the same folder on the remote server.
  6. On both servers, start the SwSqlServer service.
  7. Create the following Windows registry key on the remote server:
    HKEY_LOCAL_MACHINE\SOFTWARE\Hornbill\Supportworks Server
    (if it is a 32-bit system)
    or:
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Hornbill\Supportworks Server
    (if it is a 64-bit system)
  8. To this key, add a string value named InstallPath, containing data as follows:
    C:\Program Files\Hornbill\Supportworks Server
  9. Create the following two ODBC DSNs on the remote server, using the parameters given, to allow connection to your Supportworks databases:
    Supportworks Cache
    DSN: Supportworks Cache
    Description: Supportworks Cache Data
    Host/Server Name: main-Supportworks-server
    Database Name: sw_systemdb
    User: remote-user (the name of the account granted access in Stage 1)
    Password: remote-user-password (that account's password)
    Port: 5002
    Supportworks Data
    DSN: Supportworks Data
    Description: Supportworks Application Data
    Host/Server Name: application-database-server (whichever server your Supportworks application database system is located on)
    Database Name: application-database-name (usually "swdata")
    User: remote-user (whichever account the remote server is to use for connecting to your Supportworks application database, as set up in Stage 1)
    Password: remote-user-password (that account's password)
    Port: 5002
  10. On the remote server, open the copied file C:\Program Files\Hornbill\Core Services\SwHTTPServer\HtDocs\sw\SelfService-instance\_ssconfig.php in a text editor and update the following lines as necessary so that they reference the remote SelfService instance and the Supportworks server:
    define('_INSTANCE_NAME', 'SelfService-instance');
    define('_SERVER_NAME', 'main-Supportworks-server');
  11. On the remote server, open the copied file C:\Program Files\Hornbill\Supportworks Server\Conf\SwServerService.xml in a text editor and update the following lines in the Database section so that the values match the credentials you specified when creating the ODBC DSNs in step 6 above:
    Firstly, for the Supportworks cache...
    <SwSQLGlobalRootAccountMsl value = "remote-user"/>
    <SwSQLGlobalRootPasswordMsl value = "remote-user-password"/>
    Secondly, for the Supportworks data...
    <DefaultDSN value = "Supportworks Data"/>
    <DefaultUID value = "remote-user"/>
    <DefaultPWD value = "remote-user-password"/>
    Note that the passwords here should not be encrypted. If you can see an encrypt flag at the end of a password line, then ensure it is set to "0".
  12. On the remote server, open the copied file C:\Program Files\Hornbill\Core Services\SwHTTPServer\phpincludes\appcode\portal\installpath.php in a text editor and uncomment the following global-parameter lines by deleting the twin forward slashes (//):
    $GLOBALS['portal_path'] = ...
    $GLOBALS['instance_path'] = ...
  13. On the remote server, open the copied file C:\Program Files\Hornbill\Core Services\SwHTTPServer\phpincludes\appcode\portal\classDatabaseAccess.php in a text editor and (near the beginning of the file) change all instances of localhost to the name or IP address of the Supportworks server.
  14. Repeat the above step for any other files in the ...\portal folder that may contain instances of localhost.
  15. If the remote server is within a DMZ, ensure that your firewall is configured such that ports 5001 to 5005 on the main Supportworks server are accessible from the remote server.
  16. If the application database management system is Microsoft SQL Server, ensure that port 1433 on that server is likewise accessible from the remote server. This port is the IANA-allocated remote Microsoft SQL connection port.

Note: The file php_sw.dll uses the path given in the Supportworks Server registry key's InstallPath data to locate SwServerService.xml. If you have any issues loading php_sw.dll, you will find an appropriate error entry within php_sw_critical.log.