Setting Up Apache HTTP Server for Designer of Business Applications on Debian 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

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

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

  1. Create a file /etc/apache2-fp9.2/sites-available/fp9.2-dhtml.conf with the contents:

<VirtualHost *:8092>

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/ ${PATH_TO_DBA}/

RewriteEngine On

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

RewriteRule .* - [env=CACHEBLE]

KeepAlive Off

<Directory "${PATH_TO_DBA}/">

Options Indexes

AllowOverride All

Require all granted

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>

  1. Include the new website to the configuration of the Apache2 instance and the headers and rewrite modules:

sudo a2ensite-fp9.2 fp9.2-dhtml
sudo a2enmod-fp9.2 headers
sudo a2enmod-fp9.2 rewrite

  1. Grant Apache2 access permissions to the designer of business applications files:

sudo chown -R www-data:www-data /opt/Foresight/9.2/dba

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