If the web application works via the HTTPS protocol, an additional setting will be required for correct work of web forms using the WebSocket protocol to ensure that encrypted WSS connection is used.
To set up web forms in the web application that works via the HTTPS protocol:
Add the <VirtualHost *:9091> section after the existing <VirtualHost> section in the web server configuration file:
/etc/apache2-fp10.x-web/sites-available/webserver.conf in Debian-based distributions.
/etc/httpd-fp10.x-web/conf.d/00-virtualhost.conf in RedHat-based distributions.
/etc/httpd2-fp10.x-web/conf/sites-enabled/000-default.conf in ALT Linux.
<VirtualHost *:9091>
ProxyPass /service ws://localhost:${WEBFORMS_PORT}/service
ProxyPassReverse /service ws://localhost:${WEBFORMS_PORT}/service
SSLEngine on
SSLCertificateFile <path to folder>/server.cer
SSLCertificateKeyFile <path to folder>/server.key
SSLProxyEngine On
RewriteEngine On
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule ^(.*) ws://localhost:${WEBFORMS_PORT}/$1 [P,L]
</VirtualHost>
In the <path to folder> substitution specify the folder with the server certificate and its private key. The certificate can be prepared using special cryptographic tools, for example, OpenSSL.
NOTE. Web forms work via the 9091 port by default. If required, use the 9093 port and change the <VirtualHost *:9091> section to <VirtualHost *:9093>.
Add the WEBFORMS_PORT environment variable to the end of the /etc/opt/foresight/fp10.x-webserver/envvars file:
WEBFORMS_PORT=<port number>
In the <port number> substitution specify the port, to which requests will be directed from web server to BI server, depending on the port in use at the Step 1:
If the <VirtualHost *:9091> section was used at the Step 1, specify the 9093 port.
If the <VirtualHost *:9093> port was added at the Step 1, specify the 9091 port.
Add the string for listening of the port, to which requests from the client will be directed, in the web server configuration file:
/etc/apache2-fp10.x-web/ports.conf in Debian-based distributions.
/etc/httpd-fp10.x-web/conf/httpd-fp10.x-web.conf in RedHat-based distributions.
/etc/httpd2-fp10.x-web/conf/ports-enabled/http-fp10.x-web.conf in ALT Linux.
Listen <port number>
In the <port number> substitution specify the port depending on the port in use at the Step 1:
If the <VirtualHost *:9091> section was added at the Step 1, specify the 9091 port.
If the <VirtualHost *:9093> section was added at the Step 1, specify the 9093 port.
Enable the proxy_http, proxy_wstunnel modules if Debian-based distributions and ALT Linux are used:
sudo a2enmod-fp10.x-web proxy_http
sudo a2enmod-fp10.x-web proxy_wstunnel
Execute one of the operations:
If the <VirtualHost *:9091> section was added at the Step 1, determine port for web forms to work via the WebSocket protocol in the settings.xml BI server settings file:
<Configuration>
<Root>
<Key Name="PP">
<BIS>
<Key Name="System">
<WebForms Port="9093"/>
</Key>
</BIS>
</Key>
</Root>
</Configuration>
If the <VirtualHost *:9093> section was added at the Step 1, specify the port that will be used for web forms in the config.json web application configuration file:
"webSocketPort": "9093"
Restart the web server:
Debian-based distributions:
sudo systemctl restart apache2-fp10.x-web
RedHat-based distributions:
sudo systemctl restart httpd-fp10.x-web
ALT Linux:
sudo systemctl restart httpd2-fp10.x-web
After executing the operation, web forms are set up to work via the WebSocket protocol with WSS connection encryption.
See also: