Run NGINX server as redirector for Applicare controller (Build Nginx from Source on Linux)

Needs internet access

This article links to 2 files hosted online. To install on a host without internet access, download them beforehand on a connected machine.

Community post

Shared by the Applicare community. It has not been re-checked against Applicare 10.0, so confirm the steps in your environment or contact Support.

Step 1: Follow the instruction to Install Applicare

Note: Enter the server IP and server port in the Applicare.props and ApplicareController.props file with the nginx running IP and port.

Step 2: Download nginx

Step 3: Download the zlib and pcre library file

Step 4: Extract the Nginx, zlib, Pcre zip file.

Step 5: Follow the steps below to install and run Nginx as Services.

  1. Go to Nginx extracted directory.
  2. Execute Below command.
./configure --with-pcre=<pcre_ectracted_directory> --with-zlib=<zlib_ectracted_directory>
make
make install
  3. To view the  version of nginx, do the following.
cd /usr/local/nginx/sbin
./nginx -v

Step 5: Below steps for starting services on Nginx.

  1. Go to below directory.
/lib/systemd/system
  2. we can create a **nginx.service** file.
 [Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target
[Service]
Type=forking
PIDFile=/var/run/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
3. You can enable Nginx on startup with the following command.
systemctl enable nginx

Step 6: Go to the /usr/local/nginx/conf folder. And edit the nginx.conf file.

Step 7: Enter the IP of the machine running nginx instead of localhost where the server name is.

[Screenshot 1 is not available on this page.]

Step 8: Add the below line before server line

upstream tomcat {
            ip_hash;
            server <Controller_IP>:<Contrller_Port>;
    }

[Screenshot 2 is not available on this page.]

Step 9: Add the below line in end of location line.

proxy_pass http://tomcat;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

[Screenshot 3 is not available on this page.]

Join the discussion

Comments, voting and following are kept by Zendesk and need a Help Center account. This button opens the original discussion there.

Opens Zendesk · needs internet and sign-in

Still stuck? Contact support