1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug [1.2/1.1.5]All IP address is 127.0.0.1

Discussion in 'Resolved Bug Reports' started by btfstone, Jul 19, 2013.

  1. btfstone

    btfstone Member

    I used Nginx+LiteSpeed
    Code:
    server
    {
    listen  80;
    server_name  XXXX;
    index index.html index.htm index.php;
    root    /home/wwwroot/XXXX/public_html;
    include /usr/local/nginx/conf/proxy.conf;
    
    location / {
    location ~ .*\.(php|php5)?$ {
    index index.php;
    root /home/wwwroot/XXXX/public_html;
    proxy_pass    http://127.0.0.1:8088; 
    }
    if ( !-e \$request_filename) {
    proxy_pass  http://127.0.0.1:8088;
    }
    location ~* \.(jpg|jpeg|gif|png|swf|htm|html|rar|zip|7z|xml)$ {
    if (-f \$request_filename) {
    root /home/wwwroot/XXXX/public_html;
    expires    30d;
    break;
    }
    }
    location ~* \.(js|css)$ {
    if (-f \$request_filename) {
    root /home/wwwroot/XXXX/public_html;
    expires    1d;
    break;
    }
    }
    }
    }


    123.png
     
  2. btfstone

    btfstone Member

    All member's IP is 127.0.0.1
     
  3. Mike

    Mike XenForo Developer Staff Member

    You're reverse proxying so all your IPs as seen by your web server will be 127.0.0.1. You should see what header the real IP is being forwarded as and set that to override the default (REMOTE_ADDR).
     
    btfstone likes this.
  4. btfstone

    btfstone Member

    How can I solve it?
     
  5. btfstone

    btfstone Member

    I found it.Use Client IP in Header!

    123.png
     
    Last edited: Jul 19, 2013

Share This Page