Nginx is primarily designed as a reverse proxy and can add a lot of value if placed in front of your applications: HTTPS termination HTTP2 termination WAF protection DOS protection Caching Basic/Digest Authentication Let’s see how we can setup a basic Java API webapp behind Nginx server { # custom virtual host root folder root /var/www/mydomain.com/web/; # index file (when a folder URI is matched)