0

I have configured nginx as reverse proxy with many addresses configured in backend section. This is configuration:

upstream backend {
                server xxx.xxx.xxx.xxx:4000;}
server {
    listen       1337 default_server;
    listen       [::]:1337 default_server;
    server_name  _;
    root         /usr/share/nginx/html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;
            resolver                       8.8.8.8;
            proxy_connect;
            proxy_connect_allow            443;
            proxy_connect_connect_timeout  10s;
            proxy_connect_read_timeout     10s;
            proxy_connect_send_timeout     10s;
            location / {
                    proxy_set_header Host $host;
                    proxy_bind $server_addr;
                    proxy_ssl_server_name on;
                    proxy_pass http://backend;
                    proxy_set_header X-Forwarded-Proto https;
            }

            error_page 404 /404.html;
        location = /40x.html {
    }

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

I am using this nginx configured in my browser to surf web. The story is, when check what is my ip address on google i see ip address of server. Are there any way to present me (client) on web using ip address configured in backend part?

Thank you all!

VeseliD
  • 1
  • 1
  • 2
  • You mean, if you browse to `http://example.com`, you want the `example.com` server to think the connection is coming from itself? BTW your use case is called [forward proxy](https://www.alibabacloud.com/blog/how-to-use-nginx-as-an-https-forward-proxy-server_595799), not `reverse proxy`, though the configuration is a mix of forward and reverse proxy. – Piotr P. Karwasz Mar 29 '20 at 17:10

0 Answers0