How to Install a Spring Boot Web Application with Nginx as Reverse Proxy on Debian
Assuming that you have a Spring Boot application packaged as an uber jar in /var/myapp, to install it as a systemd service, create a script named myapp.service and place it in /etc/systemd/system directory. The following script offers an example:
Remember to change the Description, User, Group, Environment and ExecStart fields for your application.
The user that runs the application, the PID file, and the console log file are managed by systemd itself and therefore must be configured by using appropriate fields in the ‘service’ script. Consult the service unit configuration man page for more details.
To flag the application to start automatically on system boot, use the following command:
Next, you will need to install Nginx as a reverse proxy for Apache Tomcat. First, install the Nginx web server with the following command: