Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Set up Proxy Server (2 replies)

$
0
0
Dear,

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 => 192.20.2.100
Machine B: is proxy server e.g=> 192.20.4.50

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

Setting on Machine B:
server {
listen 192.20.4.50:80;
server_name webtest.com
#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_pass http://127.0.0.1:80;
#proxy_pass http://www.oorsprong.org/;
#proxy_pass http://google.com/;
proxy_pass http://bing.com/;

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,
Saeed.

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>