Monthly Archives: June 2011

Nginx 代理 apache 获取真实用户ip地址

Posted by bower on June 27, 2011
linux/ubuntu, ubuntu server / No Comments

分享给你的朋友->bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Nginx proxy to Apache – access remote host IP address using mod_praf

 

server {
  listen 80;
  server_name mydomain.com;
    location / {
      access_log off;
      proxy_pass http://mydomain.com:8080;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

Continue reading…