Configuring a remote HTTP server
Set up your system to use IBM HTTP Server for IBM i remotely.
Procedure
- Ensure that you have installed the WebSphere Application Server web server plug-in.
- On the remote Web server machine, verify that the following
Web server configuration files exist:
- WC_userdir/instances/instance_name/httpconf/httpconf.conf
- WC_userdir/instances/instance_name/httpconf/plugin-cfg.xml
- WC_userdir/instances/instance_name/httplogs
- WC_userdir/instances/instance_name/web
- WC_userdir/instances/instance_name/web/index.html
- Change the user profile on your remote machine, so that
the library of the remote instance is set to the current library.
To complete these changes, run the following command:
Where:CHGUSRPRF USRPRF(instance_name) CURLIB(instance_name)
- instance_name
- is the name of the WebSphere Commerce instance.
- On the remote Web server machine, assign a certificate to the HTTP server. See Web server post-instance creation tasks.
- On the remote Web server machine, open a Qshell session
and issue the command:
chmod -R 755 /QIBM/UserData/CommerceServer70/instances/instance_name
- As a check, ensure the WebSphere Commerce instance and associated Web server start successfully.
- Log into the WebSphere Administrative Console. Navigate to Servers > Web servers.
- Click webserver1. Under Additional Properties click Remote Web server management. Enter the remote_user and remote_password. Click OK.
- Save your changes.
- On the Web servers panel, check the box for webserver1 and click Generate Plug-in.
- Propagate the plug-in configuration file by following the steps in Copying the plugin-cfg.xml file to Web server.
- On the Web servers panel, check the box beside webserver1 and click Propagate Plug-in.
- Log out of the WebSphere Administrative Console.
- Restart the WebSphere Commerce Web server.
- On the WebSphere Commerce machine, create a save file in
a temporary library. Issue the following command:
WhereSAV DEV('/qsys.lib/templib.lib/savf.file) OBJ(('WC_profiledir/installedApps/ WC_instance_name_cell/WC_instance_name.ear)) SUBTREE(*ALL) SAVACT(*YES)
- templib
- is the temporary library the save file is created in.
- savf
- is the save file created
- Use FTP in binary mode to copy the save file from the WebSphere Commerce machine to the remote Web server machine.
- On the remote Web server machine, start a System i Navigator session.
- Create the following directory:
The directory that is created must be identical to the directory on the WebSphere Commerce machine.WC_profiledir/installedApps/WC_instance_name_cell
- On the remote Web server machine, restore the save file
that was created in step 12. Use the following command:
RST DEV('/qsys.lib/templib.lib/savf.file) OBJ(('WC_profiledir/installedApps/ WC_instance_name_cell/WC_instance_name.ear)) SUBTREE(*ALL) ALWOBJDIR(*OWNER)
- On the remote Web server machine, assign the correct permissions
to the Web server objects. Issue the following commands:
CHGAUT OBJ(WC_profiledir) USER(QTMHHTTP) DTAAUT(*RX) SUBTREE(*ALL) CHGAUT OBJ(WC_profiledir) USER(QTMHHTTP) DTAAUT(*RWX) SUBTREE(*ALL)
- On the remote Web server machine, only static content files
are required. Remove the following files:
WC_profiledir/installedApps/WC_instance_name_cell/WC_instance_name.ear/*.jsp WC_profiledir/installedApps/WC_instance_name_cell/WC_instance_name.ear/*.jar WC_profiledir/installedApps/WC_instance_name_cell/WC_instance_name.ear/*.rar
- Restart the WebSphere Commerce Web server.
- You must update the web server machine with a new Stores.war file every time that you perform an action that updates the static web content inside the application. For example, Store Publishing, and Upload Logo. The Stores.war is located in the following directory: WC_profiledir/installedApps/cell_name/WC_instance_name.ear/Stores.war Ensure that the path to this file is the same on the web server node and the WebSphere Commerce node.