upstream imserver  {
    server 127.0.0.1:8080; #Apache
}

server {
    listen 80;
    server_name  www.wildfirechat.cn;

    root   html;
    index  index.html index.htm index.php;

    location /route {
        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_pass  http://imserver;
    }

    #社区版需要启用下面一段，专业版不能用
    location /im {
        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_pass  http://imserver;
    }

    location /api {
        proxy_pass  http://imserver;
    }

    location /fs {
        proxy_pass  http://imserver;
    }

    location /robot {
        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_pass  http://imserver;
    }

    location /channel {
        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_pass  http://imserver;
    }
}
