Setting up a user publish directory
About this task
You can put custom HTML files (files generated from the Deployment Wizard), config.properties, and CustomizedCAs.p12 files in a directory other than the Host On-Demand default publish directory. Creating a user publish directory makes it easier to apply future Host On-Demand upgrades because installing a new version of Host On-Demand will not affect the new directory. It also keeps the Host On-Demand publish directory read-only and provides a separate writable location for deploying Deployment Wizard pages. Additionally, creating a separate user publish directory isolates new files from those provided by Host On-Demand. Note that other user-modified files (such as programmable Host On-Demand applets) still need to run from the Host On-Demand publish directory.
To set up a separate user publish directory, do the following:
Procedure
- Specify the codebase (the URL of your Host On-Demand publish
directory) as follows:
- Using the Deployment Wizard, on the Additional Options page, click the Advanced Options button.
- Select Code base.
- Enter the codebase. You can enter a fully qualified URL including the hostname (for example, http://your_HOD_server/hod_publish_dir_alias/) or a relative path (for example, /hod_publish_dir_alias/).
- Click OK to return to the Additional Options window.
- On the Additional Options page, click Next to proceed.
- Select Output Zip to save the files generated from the Deployment Wizard in HTML and a zip file format.
- Click Create Files.
- If you are not running the Deployment Wizard on your Host On-Demand server, FTP the output Zip file to your server platform.
- Create a separate user publish directory, /user_publish_dir/.
- Create an alias for the user publish
directory on the web server (such as Apache, IIS, and so on) and restart
it for the changes to be implemented. The user publish
directories are displayed as the examples show below on different
platforms.
- Windows
Alias /user/ "c:/Users/user_name/Documents/<user_pub_dir_name>/" <Directory "C:/Users/ user_name /Documents/<user_pub_dir_name>" AllowOverride None Options None Order allow,deny Allow from all </Directory>
- Linux or AIX: Apache 2.2 or IBM HTTP Server
Alias /user/ "/opt/<user_pub_dir_name>/" <Directory "/opt/<user_pub_dir_name>"> AllowOverride None Options None Order allow,deny Allow from all </Directory>
- Linux or AIX: Apache 2.4
Add an additional line on the web server with Linux or AIX: Apache 2.2. Require all granted as mentioned below:
Alias /user/ "/opt/<user_pub_dir_name>/" <Direcory "/opt/<user_pub_dir_name>"> AllowOverride None Options None Order allow,deny Allow from all Require all granted </Directory>
- z/OSRefer to the following documentation for the different Web servers on z/OS:
For more information about the Apache 2.4 directives, refer to the Directive Index.
- i5 OS
Alias /user/ "/QIBM/ProdData/<user_pub_dir_name>/" <Directory "/QIBM/ProdData/<user_pub_dir_name>/> AllowOverride None Options None Order allow,deny Allow from all </Directory>
Note: The name of the alias and the path and name of the user_publish_dir is completely customizable according to the user preferences. - Windows
- Use the DWunzip tool to install the Deployment Wizard generated
files into the /user_publish_dir/ directory. You must edit the DWunzip
command file on your server to specify the correct MY_PUBLISHED_DIRECTORY value.
You will find the sample DWunzip.cmd on Windows machines
in \HostOnDemand\lib\samples\DWunzip. See the online help topic Using
DWunzip for more information on how to use this tool. The following
examples shows a simple customized section of DWunzip.cmd.
REM ########################################################################## REM If you do not use Host On-Demand's default web-published directory, then REM set the following variable to be your web-published directory. REM Note: This is also the directory where your zip file should be. REM Example: set MY_PUBLISHED_DIRECTORY=c:\HostOnDemand\HOD set MY_PUBLISHED_DIRECTORY=c:\HostOnDemand\HOD REM ########################################################################## REM If you run DWUnzip from anywhere other than the directory where REM Host On-Demand was installed, then set the following variable REM to your Host On-Demand installation directory. REM EXAMPLE: set MY_HOD_DIRECTORY=c:\HostOnDemand set MY_HOD_DIRECTORY=c:\HostOnDemand
The execution of the DWunzip results in the following example.
C:\Program Files\IBM\DeploymentWizard>dwunzip teamcom2wizz Extracting teamcom2wizz.zip to and from directory: c:\HostOnDemand\HOD Allocating ZIP comments array Added ZIP comment "HODCDLABEL" Added ZIP comment "HODCDLABEL" Added ZIP comment "HODCDLABEL" Added ZIP comment "HODCDLABEL" Added ZIP comment "HODCDLABEL" Added ZIP comment "HODCDLABEL" File being extracted from teamcom2wizz.zip: Teamcom2wizz.html File being extracted from teamcom2wizz.zip: HODData\Teamcom2wizz\cfg0.cf File being extracted from teamcom2wizz.zip: HODData\Teamcom2wizz\params.txt File being extracted from teamcom2wizz.zip: HODData\Teamcom2wizz\policy.obj File being extracted from teamcom2wizz.zip: HODData\Teamcom2wizz\preloads.obj File being extracted from teamcom2wizz.zip: HODData\Teamcom2wizz\wInfo.txt File extraction was a success.
The Deployment Wizard HTML files are installed in the directory /user_publish_dir/. Additional files like cfg0.cf, params.txt, and so forth, are installed in the /user_publish_dir/HODData/your_html directory as shown in the above example.
- If Host On-Demand configuration servlet is in use, place the config.properties file in the HOD publish directory.
- If SSL is being used, place the updated CustomizedCAs.p12 or CustomizedCAs.jks file in the HOD publish directory. This keeps all your customized files in one place.
- Create symbolic links to the files
that are to be used by the user like config.properties and CustomizedCAs.p12
or CustomizedCAs.jks from the HOD publish directory to the user publish
directory.
Syntax on different platforms are displayed as below:
- Windows
mklink /h "<sourcefile_with_path>" "<linkfile_with_path>" Ex.)mklink /H "C:\Program Files (x86)\IBM\HostOnDemand\HOD\CustomizedCAs.jks" "c:\Users\user_dir\Documents\uer\CustomizedCAs.jks"
- Linux or AIX
Type cd to the hod publish directory.
Type the commandln<sourcefile_with_path> <linkfile_with_path> Ex.)ln CustomizedCAs.jks/usr/bin/CustomizedCAs.jks
- z/OS
Ex.)ln -s/user/publish/CustomizedCA.jks /usr/lpp/HOD/hostondemand/HOD
- i5 OS
Change to the HOD publish directory to create the hard link.
ADDLINK OBJ('/<user_publish_path>/<CustomizedCA.jks') NEWLINK('CustomizedCA.jks') LNKTYPE(*HARD)
- Windows
- Restart the Web server.
- From a Web browser, specify the URL: http://your_HOD_server/user_alias/your_html.html