In apache2 on Ubuntu, for example 20.04, if you want to add a new site or configuration for a site you must first define the site in a configuration file to be left in /etc/apache2/sites-availables, for example in this case we leave an akyguclient.conf file that handles all requests to the Apache in question:

Listen 8008
NameVirtualHost *:8008
<VirtualHost *:8008>
  ServerName dev03
  
  ProxyPreserveHost On

  ProxyPass /kie-server/ http://dev02:8080/kie-server/
  ProxyPassReverse /kie-server/ http://dev02:8080/kie-server/

  ProxyPass / http://dev03:8080/
  ProxyPassReverse / http://dev03:8080/

</VirtualHost>

This file serves all requests to apache server port 8008 dev03 and performs a proxy pass to a jBPM server that is on the dev02 server serving by port 8080 of all requests in the /kie-server context. And it also makes a proxy pass of all other requests going to/from dev03 per port 8008 to the service of a java jHipster application that is responsive by port 8080. This configuration is a typical configuration to avoid cross domain problems by having an http listener, in this case an Apache, which proxys the two services: management app and jBPM server.

Once this file is created, you must run the following command that what it does is a link in the /etc/apache2/sites.enabled folder of this akyguclient.conf file located in the /etc/apache2/sites-availables folder:

a2ensite akyguclient.conf

Let's look at the structure of files and links in the different apache2 folders:

root@dev03:/etc/apache2# pwd
/etc/apache2
root@dev03:/etc/apache2# ls -la
total 96
drwxr-xr-x   8 root root  4096 dic 18 14:32 .
drwxr-xr-x 152 root root 12288 dic 24 07:20 ..
-rw-r--r--   1 root root  7224 ago 12 21:46 apache2.conf
drwxr-xr-x   2 root root  4096 dic  7 16:58 conf-available
drwxr-xr-x   2 root root  4096 dic  7 16:58 conf-enabled
-rw-r--r--   1 root root  1782 abr 13  2020 envvars
-rw-r--r--   1 root root 31063 abr 13  2020 magic
drwxr-xr-x   2 root root 12288 nov 30 21:34 mods-available
drwxr-xr-x   2 root root  4096 dic 29 20:41 mods-enabled
-rw-r--r--   1 root root   356 dic 18 14:32 ports.conf
drwxr-xr-x   2 root root  4096 dic 31 12:41 sites-available
drwxr-xr-x   2 root root  4096 dic 29 20:39 sites-enabled
root@dev03:/etc/apache2# ls -la sites-available
total 40
drwxr-xr-x 2 root root 4096 dic 31 12:41 .
drwxr-xr-x 8 root root 4096 dic 18 14:32 ..
-rw-r--r-- 1 root root 1332 abr 13  2020 000-default.conf
-rw-r--r-- 1 root root  476 dic 29 20:42 akyguclient.conf
-rw-r--r-- 1 root root 6338 abr 13  2020 default-ssl.conf
-rw-r--r-- 1 root root 1441 nov 30 22:21 proxy-3002-akygu.conf
-rw-r--r-- 1 root root 1440 dic 18 14:30 proxy-8082-akygu.conf
-rw-r--r-- 1 root root 1441 nov 30 22:20 proxy-9002-akygu.conf
root@dev03:/etc/apache2# ls -la sites-enabled
total 8
drwxr-xr-x 2 root root 4096 dic 29 20:39 .
drwxr-xr-x 8 root root 4096 dic 18 14:32 ..
lrwxrwxrwx 1 root root   35 nov 30 21:35 000-default.conf -> ../sites-available/000-default.conf
lrwxrwxrwx 1 root root   35 dic 29 20:39 akyguclient.conf -> ../sites-available/akyguclient.conf
lrwxrwxrwx 1 root root   40 nov 30 22:18 proxy-3002-akygu.conf -> ../sites-available/proxy-3002-akygu.conf
lrwxrwxrwx 1 root root   40 nov 30 22:17 proxy-8082-akygu.conf -> ../sites-available/proxy-8082-akygu.conf
lrwxrwxrwx 1 root root   40 nov 30 22:18 proxy-9002-akygu.conf -> ../sites-available/proxy-9002-akygu.conf
root@dev03:/etc/apache2#

Then to consider the changes you must run the following command:

systemctl reload apache2

And with this you have configuration access by port 8008 to the java jHipster application that is provided by port 808o and avoid cross domain errors when calling from the app implemented with jHipster to the jBPM server API located on another hostname: