Deploying in Windows VPS server : Tomcat config

Hi
I am trying to deploy my cuba web application in a VPS for the first time. As I haven’t configured VPS server to run web-application before, i took the help from different sources and here is where it stands now:

WHAT I HAVE DONE:

  • Installed JDK 1.8
  • Installed SQL Server database 2019 & PostgresSQL 12
  • Installed Tomcat 9.x
  • Created inbound rules in firewall for port 8080, 5432, 1433
  • Added JAVA_HOME, CATALINE_HOME, JRE_HOME in environment variables
  • done config/update as per this guide in CUBA_Platform

WHAT IS WORKING
a) In VPS

  • all applications are running
  • Tomcat is running from localhost/8080

b) Remotely

  • I can connect both SQL Server and PostgreSQL database from Cuba-Studio remotely (from my local computer) using the IP address and credentials and runs the application smoothly

WHAT IS NOT WORKING
Can’t run tomcat using the IP address:8080 which is probably the pre-requisit for the deployment of my application in order to log-in from any client computer.

Thanks for any help regarding what needs to be done in order to make Tomcat useable from any computer over the internet using the IP address

Resolved the issue. I am sharing what was missing in case anyone come across this needs.

  1. uncomment mark in context.xml under webapps/manager/

<Valve className=“org.apache.catalina.valves.RemoteAddrValve”

allow=“127.\d+.\d+.\d+|::1|0:0:0:0:0:0:0:1” />

If port 8080 is already used exception occured:

  1. Go to /conf/server.xml file
  2. Look for
  • HTTP/1.1
  • AJP/1.3
  1. I changed the port number of HTTP/1.1 (i.e. to 8081)

  2. Look for:

make to:

  1. Access your app in the browser at http://localhost:8081/…
    or your IP address:8081/app
1 Like

Thanks for sharing this :slight_smile:

1 Like