I found a way to do it. Basically, I've added the following line to my nginx.conf: proxy_set_header X-Real-IP $remote_addr; then, on my PHP script I only had to use $_SERVER['HTTP_X_REAL_IP'] to retrieve the client real IP address.by steves - How to...
Yes, I have restarted nginx and it does not work. :\by steves - How to...
The issue is that when I run a piece of code like this on the nodes: <?php echo "Your IP: ".$_SERVER['REMOTE_ADDR']; ?> It returns 172.20.0.11 which is the NGINX machine IP address instead of 10.104.3.61 which own IP.by steves - How to...
here's the config: upstream integration { server 172.20.0.12:80; server 172.20.0.13:80; } server { listen 172.20.0.11:80; server_name my.server.com; rewrite ^(.*) https://my.server.com$1 permanent; # Logs error_log /var/log/nginx/int-error.log; access_log /var/log/nginx/int-access.log; } # HTTPS serverby steves - How to...
I not sure whether this is possible or not, or even if it goes against the whole concept behind nginx. I have my nginx configure to work with two nodes (or upstreams, if you will). NGINX / \ / \ Node 1 Nodeby steves - How to...
![]() |
![]() |
![]() |
![]() |
|