How Nginx Sends reuests?
i am new to nginx and currently i am using nginx as a reverse proxy , we are using nginx to route the request to other urls , For example i have below code ,
location /test/rome/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#remove this line if you application does not depend
proxy_set_header X-HttpRouter-REMOTEADDR $remote_addr;
proxy_pass http://test.com/1234/test2/;
So in the above config i am saying any requests comes to /test/rome should redirect the request to the proxy pas url ? Is that mean do i need to open the FW connectivity from nginx servers to the server mentioned in proxy_pas ?
Solution 1:
Yes, this setup proxies requests with prefix /test/rome
to the URL specified in proxy_pass
.
And yes, nginx on the server needs to be able to open TCP connection to the destination server.