1
For a test environment, I need to dispatch a single request to multiple endpoints (i.e I have to duplicate the request). I would like to do so using only NGINX, but I am not sure that it is possible.
For my host, my configuration file looks like this:
server {
server_name myserver.com;
}
server {
listen 443 ssl;
server_name myserver.com;
ssl_certificate ssl/cert.pem;
ssl_certificate_key ssl/key.pem;
proxy_set_header Host myserver.com;
proxy_ssl_name myserver.com;
proxy_ssl_server_name on;
location / {
proxy_pass https://server1/;
}
I tried to use multiple proxy_pass tags, like this:
location / {
proxy_pass https://server1/;
proxy_pass https://server2/;
proxy_pass https://server3/;
}
Of course I did not really expected it to work, but I think that it will help you to understand what I am trying to achieve.
So my question is: is it possible to achieve this with NGINX?
1Not really what I expected, but thank you for the advice. – Matthieu.V – 2019-05-15T11:17:42.380