In this post, I will describe how to forward the HTTP referrer to a Spring Boot web application behind a Reverse Proxy (Nginx). The example application will log the referrer and other important information like remote IP address, preferred language and client browser type and version to the file system.
In this post, I will describe how to host multiple SSL secured domains on a Linux server with only one external IP address. For a task like this, I usually prefer Nginx as a Reverse Proxy that is used to forward incoming requests to the corresponding backend applications.
Recently I had to find a solution to host multiple web applications on a Virtual Private Server (VPS). Both applications are accessed by different domain names, each of them using separate SSL certificates. In this post I explain how to configure Nginx to fulfill these requirements.
Currently, my preferred way to set up a Spring Boot based web application in production is to use a Reverse Proxy to route traffic to the corresponding backed applications. In this context, I really like Nginx as a fast and reliable web server with low memory footprint. The problem though, when using a reverse proxy is: when requests are forwarded to the backend applications, the remote IP address of the client is being replaced by the IP address of the reverse proxy server (e.g. 127.0.0.1 when installed on the same server).
To log requests and analyze user and behavioral patterns, it is beneficial to be able to use the remote IP address. This post explains how this can be achieved easily using Nginx.