Welcome! Log In Create A New Profile

Advanced

Nginx as a forward proxy

Anonymous User
October 29, 2020 02:36PM
Dear Sir,



I am using nginx as a reverse proxy. All my requests goes to nginx and then go to application server. This works well.



I have requirement where from nginx, outbound request need to go to internet https proxy and then to some other service in AWS. Request flow is as follow



Browser --> WAF--> Nginx-->corporate https proxy --> AWS S3 (s3 streaming url).



My question is, is there a way nginx can proxy pass request to S3 via proxy server? If yes, how?



Let me know some config snippet. Thanks in Advance !!



Regards,

Shankar Borate | CoFounder & CTO | +91-8975761692

Start a Chat with me instantly… workApps.com/110 https://www.workapps.com/110

---------

Enterprise Messaging Platform for Banks, Insurance, Financial Services, Securities and Mutual Funds





From: nginx <nginx-bounces@nginx.org> On Behalf Of Kaushal Shriyan
Sent: 29 October 2020 23:42
To: nginx@nginx.org
Subject: Query on nginx. conf file regarding redirection.



Hi,



I have a specific query regarding the below /etc/nginx/nginx.conf file.



When I hit this URL http://219.11.134.114/test/_plugin/kibana/app/kibana on the browser it does not get redirected to https://vpc-lab-test-search-7hyay88a9kjuisl.eu-north-1.es.amazonaws.com/;



# TEST
server {
listen 81;
location /test {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
fastcgi_read_timeout 240;
proxy_pass https://vpc-lab-test-search-7hyay88a9kjuisl.eu-north-1.es.amazonaws.com/;
}
error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}



Similarly, when I hit this URL http://219.11.134.114/prod/_plugin/kibana/app/kibana on the browser it does not get redirected to https://vpc-lab-prod-search-9aay182kkjoisl.eu-north-1.es.amazonaws.com/



# PROD

server {
listen 80;
location /prod {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
fastcgi_read_timeout 240;
proxy_pass https://vpc-lab-prod-search-9aay182kkjoisl.eu-north-1.es.amazonaws.com/;;
}
error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}



Any help will be highly appreciated. Thanks in Advance and I look forward to hearing from you.



Best Regards,



Kaushal



_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx as a forward proxy

Anonymous User October 29, 2020 02:36PM

Re: Nginx as a forward proxy

Francis Daly October 29, 2020 07:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 253
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready