3 ms·
I can answer your question on nginx. There are multiple reasons why you would want to use it as the entry point to what you want to serve. As a standalone web s
by imwally 9y ago
I can answer your question on nginx. There are multiple reasons why you would want to use it as the entry point to what you want to serve. As a standalone web sever if offers a plethora of configuration settings that allow you to specify how you want to handle the incoming requests.
TLS is one aspect that comes to mind. A certificate and key is not enough. You must specify the correct parameters such as the cipher suites, DH parameters, HSTS, and more if you want a secure connection.
You mentioned a reverse proxy. This is the other aspect that comes to mind. Servers are bound to ports, like 80 and 443. How do you serve multiple applications on the same port on the same server? A proxy. More specifically a reverse proxy. It sits between the client and the services as a middleman to handle and direct requests. Multiple services can run on different ports but the reverse proxy allows for a single point of entry, such as HTTP requests on port 80. The proxy will inspect the request and based on certain values, say a hostname, it will be directed to the correct service. Otherwise you would have to tell your clients to specify the port the service is running on, ex: http://mydomain.com:8080 http://mydomain.com:8080
- mcrider 9y agoThis is incredibly useful for performance. If the user is requesting an image or other static asset, your reverse proxy can detect this and skip making a request to the actual application. Likewise if you want to go to some sort of cache based on the type of request.