Setting Up Apache HTTP Server for Designer of Business Applications on Astra Linux OS

This article is one of the steps of Apache HTTP Server setup to access resources of the designer of business applications. See full instruction in the Installing and Setting Up Designer of Business Applications Back End article.

It is supposed that DBA.war archive is unpacked and is in the folder /opt/Foresight/9.2/dba.

If designer of business applications folder was copied to the home user directory, execute the following commands:

cd /opt/Foresight/9.2

sudo cp -R ~/<designer of business applications folder> /opt/Foresight/9.2

sudo mv <designer of business applications folder> dba

sudo chown -R apache:apache dba

To set up Apache HTTP Server to access designer of business applications resources:

  1. Make sure that the Apache HTTP Server (httpd) web server was installed. Otherwise install the web server using the command:

sudo apt-get install apache2

  1. Open the envvars file for edit:

sudo juffed /etc/opt/Foresight/fp9.2-webserver/envvars

  1. At the end of the file specify path to the folder containing designer of business applications:

export PATH_TO_DBA=/opt/Foresight/fp9.2-dba

export PP_SOM=http://localhost/axis2/services/PP.SOM.Som

On using systemd as initialization system, it is not required to write export command for correct setup. In this case, the following strings are added to the file:

PATH_TO_DBA=/opt/Foresight/fp9.2-dba

PP_SOM=http://localhost/axis2/services/PP.SOM.Som

NOTE. Value of the PP_SOM environment variable may be different depending on where and at which port BI server is started.

  1. Open the httpd-vhosts.conf configuration file for edit.

sudo juffed /etc/opt/Foresight/httpd-fp9.2/extra/httpd-vhosts.conf

  1. Delete the current contents and make it to the following view by specifying a custom value of the ServerName parameter that matches the computer network name:

NameVirtualHost *:8092

<VirtualHost *:8092>

ServerName astralinux

Alias /dba/app/ ${PATH_TO_DBA}/app/

Alias /dba/build/ ${PATH_TO_DBA}/build/

Alias /dba/dashboard/ ${PATH_TO_DBA}/dashboard/

Alias /dba/resources/ ${PATH_TO_DBA}/resources/

Alias /dba/index.html ${PATH_TO_DBA}/index.html

Alias /dba/libs/ ${PATH_TO_DBA}/libs/

Alias /dba/ ${PATH_TO_DBA}/

ProxyPass /dba/app/PPService.axd ${PP_SOM} retry=1 acquire=3000 timeout=6000 Keepalive=On

RewriteEngine On

RewriteCond %{QUERY_STRING} (.*(?:^|&))cache(=1)?((?:&|$).*)

RewriteRule .* - [env=CACHEBLE]

KeepAlive Off

<Directory "${PATH_TO_DBA}/">

    Options Indexes

    AllowOverride All

    Order allow,deny

    Allow from all

    FileETag None

    SetEnv no-gzip 1

    SetEnv dont-vary 1

    <FilesMatch "\.([^.]+)$">

        Header set Cache-Control "public, max-age=31536000" env=CACHEBLE

        Header unset Pragma

        Header unset ETag

        UnsetEnv CACHEBLE

    </FilesMatch>

    <FilesMatch "\.cache\.(js|html)$">

        Header set Cache-Control "public, max-age=31536000"

    </FilesMatch>

</Directory>

</VirtualHost>

NOTE. Name of the dba directory can be changed for a more appropriate one depending on the installed version of Foresight Analytics Platform. For details about setup of virtual hosts in Apache2, see the official documentation.

  1. Open the httpd.conf configuration file for edit.

sudo juffed /etc/opt/Foresight/httpd-fp9.2/httpd.conf

  1. Add the string at the end of the file:

Include extra/httpd-vhosts.conf

After setting up Apache HTTP Server to access resources of the designer of business applications, restart web server.

See also:

Installing and Setting Up BI Server In Debian-based Distribution Files | Installing and Setting Up Server Part of Designer of Business Applications