#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
      include       mime.types;
      default_type  application/octet-stream;

      ### 原来的是 $host $remote_addr - $remote_user [$time_local] "$request"  ###

      log_format  main  '$http_x_forwarded_for $host $remote_addr - $remote_user [$time_local] "$request" '
      #log_format  main  '$host $remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" "$upstream_response_time"';

      access_log  logs/access.log  main;
      ### 这是安装map模块之后需要取消注释的配置 ###
      #map $http_upgrade $connection_upgrade {
      #      default upgrade;
      #       '' close;
      #   }
      ### 这是安装map模块之后需要取消注释的配置 ###


      sendfile        on;
      #tcp_nopush     on;

      #keepalive_timeout  0;
      keepalive_timeout  65;

      gzip  on;
      client_max_body_size 100M;



     server {
        listen       80;
        server_name  _;

        #charset koi8-r;

        access_log  logs/web.log  main;


        location / {
                                proxy_pass   http://192.168.1.11;
                                proxy_set_header   Host             $host;
                                proxy_set_header   X-Real-IP        $remote_addr;
                                proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
                                ##proxy_set_header   X-Forwarded-For  $remote_addr; 游戏盾用这个参数##
                                ##proxy_set_header   X-Forwarded-For  $http_x_forwarded_for;## 域名用这个参数##

        }

    }

         #include /opt/nginx/conf/conf.d/*.conf;



}
