Install > Installing or enabling additional software > Configure Social Commerce
Configure the port that the Social Commerce application listens on
You can change the port that the Social Commerce sMash application listens on after the first time you enable and configure Social Commerce.
Before you begin
Configure Social CommerceThese steps are necessary only to change your configuration after Configure Social Commerce. These steps are included when you first enable and configure Social Commerce.
Procedure
- Open the following file in a text editor:
- WC_INSTALL/components/social-commerce/config/port.config
- Check that the value for /config/http/port is set to the port to use as the internal port that the sMash application listens on.
- Save the changes and exit.
- Open a command prompt and navigate to the following directory:
- WC_INSTALL\bin
- Run the following command:
config_ant -DinstanceName=instance -buildfile ../components/common/xml/enableFeature.xml -DfeatureName=social-commerce GenerateMergedProxy
- Run the following command:
config_ant -DinstanceName=instance -buildfile ../components/common/xml/enableFeature.xml -DfeatureName=social-commerce UpdateAdapterConfig
- Update the Web server configuration file to include the modproxy, and enable the modules mod_proxy and mod_rewrite.
- Open the Web server httpd.conf file in a text editor. See the IBM HTTP Server documentation for details.
- Uncomment the following lines if they are not already uncommented (if they do not exist at all, add them):
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule rewrite_module modules/mod_rewrite.so LoadModule proxy_balancer_module modules/WebSphereCE/mod_proxy_balancer.so
- Copy the contents of the following file to the clipboard:
- WC_INSTALL/instances/instance/temp/proxy.config
- Paste the contents inside of each VirtualHost element for the IBM HTTP Server httpd.conf file.
There are at least two VirtualHost elements; one for http and one for https. The default http virtual host begins with the section <VirtualHost servername:80> and the default https virtual hosts begins with the section <VirtualHost servername:443>
In the following example, the sections associated with the RewriteRule and LocationMatch are inserted in to the appropriate VirtualHost sections in the httpd.conf file.
Sample for non-clustered configuration
#Instance name : demo <VirtualHost myserver.myhost.com:80> ServerName myserver.myhost.com Alias /wcsstore "C:\WAS7\profiles\demo\installedApps\WC_demo_cell\WC_demo.ear/Stores.war" Alias /wcs "C:\WAS7\profiles\demo\installedApps\WC_demo_cell\WC_demo.ear/CommerceAccelerator.war" RewriteRule ^/soccom$ /soccom/ [R] <LocationMatch "/soccom" > ExpiresActive Off Order allow,deny Allow from all ProxyPass http://myserver.myhost.com:9980/soccom ProxyPassReverse http://myserver.myhost.com:9980/soccom </LocationMatch> </VirtualHost> <VirtualHost myserver.myhost.com:443> SSLEnable SSLClientAuth 0 ServerName myserver.myhost.com Alias /wcsstore "C:\WAS7\profiles\demo\installedApps\WC_demo_cell\WC_demo.ear/Stores.war" Alias /wcs "C:\WAS7\profiles\demo\installedApps\WC_demo_cell\WC_demo.ear/CommerceAccelerator.war" RewriteRule ^/soccom$ /soccom/ [R] <LocationMatch "/soccom" > ExpiresActive Off Order allow,deny Allow from all ProxyPass http://myserver.myhost.com:9980/soccom ProxyPassReverse http://myserver.myhost.com:9980/soccom </LocationMatch> </VirtualHost>
- Save and close the file.
- Restart the Web server.