Set up Proxy Server

ha_saeeda nginx-forum at
Sat Sep 19 03:41:21 UTC 2015


I'm trying to set up a proxy server with Nginx. In this case I have two
machines both of them on Linux.

Machine A: is database server e.g =>
Machine B: is proxy server e.g=>

So I want to access to internet via proxy server like this. 
I could set up but the Machine A only access to one URL or Site at same
How can I access to any URL at internet from Machine A?

Setting on Machine B:
server {
    #charset koi8-r;
    access_log  /var/log/nginx/log/host.access.log  main; 
    location / {
      	root   /usr/share/nginx/html;
       	index  index.html index.htm;

       	client_max_body_size 10m;
client_body_buffer_size 128k;

proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_connect_timeout 30s;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

Best regards,

Posted at Nginx Forum:,261649,261649#msg-261649

More information about the nginx mailing list