Multiple virtualhosts with the same backend
This example defines a reverse proxy with two virtualhosts: one for example.com, and another for other-website.com. The agent listens on both ports 80 and 443.
The agent acts as an SSL endpoint, with SSL certificates configured for each of the two virtual hosts. In both cases, the requests is forwarded in http (not https) to the backend server at 127.0.0.1:8080.
The definition of the forward address can also be a hostname (eg. backend.internal.example.com:8080). In this case, the agent will resolve this address prior to establishing the forwarding connexion.
If the requests must be forwarded in https to the backend server, you must enable the tls option in the forward configuration, and provide the necessary TLS configuration (eg. tls: true, tls.allow_invalid_certificates: true, etc.). See the agent configuration reference for more details about the forward configuration options.