Install > Install Service Manager Collaboration > Deploy Service Manager Collaboration with HTTP > Task 10: Define the display of the End User Chat UI for Service Portal

Task 10: Define the display of the End User Chat UI for Service Portal

Note Skip this task if your organization uses Service Manager ESS portal for end users.

An end user needs to click the chat button to open the End User Chat window. For Service Manager Service Portal, you must access the chat UI's SSL URL through Apache. In this task, you will configure Apache and define the open SSL reverse proxy. Note that the open SSL is established between the Apache server and the web browser only. The chat server, the chat service, and the Service Manager server are still connecting to the Apache server through HTTP.

Note The Apache server and Service Manager Service Portal must use SSL certificates issued by the same Certificate Authority (CA) and the SSL certificates or the CA must be trusted by the end user's web browser.

Follow these steps:

  1. (For Apache 2.4) Navigate to the C:\Apache24\conf\extra directory.

  2. Open the httpd-ahssl.conf file with a text editor.
  3. Locate the following section by searching for ServerName localhost:

    <VirtualHost _default_:443>
    SSLEngine on
    ServerName localhost:443
    SSLCertificateFile "${SRVROOT}/conf/ssl/server.crt"
    SSLCertificateKeyFile "${SRVROOT}/conf/ssl/server.key"
    DocumentRoot "${SRVROOT}/htdocs"
    # DocumentRoot access handled globally in httpd.conf
    CustomLog "${SRVROOT}/logs/ssl_request.log" \
    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    <Directory "${SRVROOT}/htdocs">
    Options Indexes Includes FollowSymLinks
    AllowOverride AuthConfig Limit FileInfo
    Require all granted
    </Directory>
    </virtualhost>
    
  4. Insert the lines in bold to this section as shown below (insert 5 lines below the SSLEngine on line and 6 lines between </Directory> and </virtualhost>).

    <VirtualHost _default_:443>
    SSLEngine on
    SSLProxyEngine On
    SSLProxyVerify none 
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off
    ServerName localhost:443
    SSLCertificateFile "${SRVROOT}/conf/ssl/server.crt"
    SSLCertificateKeyFile "${SRVROOT}/conf/ssl/server.key"
    DocumentRoot "${SRVROOT}/htdocs"
    # DocumentRoot access handled globally in httpd.conf
    CustomLog "${SRVROOT}/logs/ssl_request.log" \
    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    <Directory "${SRVROOT}/htdocs">
    Options Indexes Includes FollowSymLinks
    AllowOverride AuthConfig Limit FileInfo
    Require all granted
    </Directory>
    ProxyPass /of-http-bind http://training.sm-demo.com:7070/http-bind
    ProxyPassReverse /of-http-bind http://training.sm-demo.com:7070/http-bind
    ProxyPass /of-plugins http://training.sm-demo.com:9090/plugins
    ProxyPassReverse /of-plugins http://training.sm-demo.com:9090/plugins
    ProxyPass /chatservice http://training.sm-demo.com:8088
    ProxyPassReverse /chatservice http://training.sm-demo.com:8088
    </virtualhost>
    

    Note /of-http-bind is the path of the Openfire HTTP binding (also known as BOSH) reverse configuration, whereas /of-plugins is the identifier of the Openfire plugin directory. These two parameters have been used in Task 6.

    /chatservice is the path of chat service reverse configuration. This parameter has been used in Task 6.

    Note You need to change training.sm-demo.com to your own host name.

  5. Locate the following section by searching for ServerName serverone.tld.

    <VirtualHost *:443>
    SSLEngine on
    ServerName serverone.tld:443
    SSLCertificateFile "${SRVROOT}/conf/ssl/serverone.crt"
    SSLCertificateKeyFile "${SRVROOT}/conf/ssl/serverone.key"
    DocumentRoot "${SRVROOT}/htdocs"
    CustomLog "${SRVROOT}/logs/ssl_request.log" \
    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    <Directory "${SRVROOT}/htdocs">
    Options Indexes Includes FollowSymLinks
    AllowOverride AuthConfig Limit FileInfo
    Require all granted
    </Directory>
    </virtualhost>
    
  6. Insert the lines in bold to this section as shown below (insert 5 lines below the SSLEngine on line and 6 lines between </Directory> and </virtualhost>).

    <VirtualHost *:443>
    SSLEngine on
    SSLProxyEngine On
    SSLProxyVerify none 
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off
    ServerName serverone.tld:443
    SSLCertificateFile "${SRVROOT}/conf/ssl/serverone.crt"
    SSLCertificateKeyFile "${SRVROOT}/conf/ssl/serverone.key"
    DocumentRoot "${SRVROOT}/htdocs"
    CustomLog "${SRVROOT}/logs/ssl_request.log" \
    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    <Directory "${SRVROOT}/htdocs">
    Options Indexes Includes FollowSymLinks
    AllowOverride AuthConfig Limit FileInfo
    Require all granted
    </Directory>
    ProxyPass /of-http-bind http://training.sm-demo.com:7070/http-bind
    ProxyPassReverse /of-http-bind http://training.sm-demo.com:7070/http-bind
    ProxyPass /of-plugins http://training.sm-demo.com:9090/plugins
    ProxyPassReverse /of-plugins http://training.sm-demo.com:9090/plugins
    ProxyPass /chatservice http://training.sm-demo.com:8088
    ProxyPassReverse /chatservice http://training.sm-demo.com:8088
    </virtualhost>
    
  7. Locate the following section by searching for ServerName servertwo.tld.

    <VirtualHost *:443>
    SSLEngine on
    ServerName servertwo.tld:443
    SSLCertificateFile "${SRVROOT}/conf/ssl/servertwo.crt"
    SSLCertificateKeyFile "${SRVROOT}/conf/ssl/servertwo.key"
    DocumentRoot "${SRVROOT}/htdocs"
    CustomLog "${SRVROOT}/logs/ssl_request.log" \
    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    <Directory "${SRVROOT}/htdocs">
    Options Indexes Includes FollowSymLinks
    AllowOverride AuthConfig Limit FileInfo
    Require all granted
    </Directory>
    </virtualhost>
    
  8. Insert the lines in bold to this section as shown below (insert 5 lines below the SSLEngine on line and 6 lines between </Directory> and </virtualhost>).

    <VirtualHost *:443>
    SSLEngine on
    SSLProxyEngine On
    SSLProxyVerify none 
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off
    ServerName servertwo.tld:443
    SSLCertificateFile "${SRVROOT}/conf/ssl/servertwo.crt"
    SSLCertificateKeyFile "${SRVROOT}/conf/ssl/servertwo.key"
    DocumentRoot "${SRVROOT}/htdocs"
    CustomLog "${SRVROOT}/logs/ssl_request.log" \
    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    <Directory "${SRVROOT}/htdocs">
    Options Indexes Includes FollowSymLinks
    AllowOverride AuthConfig Limit FileInfo
    Require all granted
    </Directory>
    ProxyPass /of-http-bind http://training.sm-demo.com:7070/http-bind
    ProxyPassReverse /of-http-bind http://training.sm-demo.com:7070/http-bind
    ProxyPass /of-plugins http://training.sm-demo.com:9090/plugins
    ProxyPassReverse /of-plugins http://training.sm-demo.com:9090/plugins
    ProxyPass /chatservice http://training.sm-demo.com:8088
    ProxyPassReverse /chatservice http://training.sm-demo.com:8088
    </virtualhost>
    
  9. Save and close the httpd-ahssl.conf file.

  10. Restart the Apache service.

Follow these steps to update the chat service URL in Service Manager Chat UI:

  1. Navigate to the C:\Program Files\Apache Software Foundation\Tomcat 8.0_SMWeb\webapps\chatui\conf directory, and then open env.js with a text editor.

  2. Update the chatServiceUrl value, which must be the real URL that you can access through Apache. For example, https://training.sm-demo.com/chatservice

  3. Save your changes and close this file.

Tip For more information about how to enable End User Chat in Service Manager Service Portal, see Install and set up a single Service Manager Service Portal instance.