Nginx.conf

40 阅读1分钟

#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;
}

stream{

      #log_format
      log_format logformat 'time_local | requestIp: remote_addr | '
                           'protocolType: protocol&nbsp;|&nbsp;status:&nbsp;&nbsp;status | requestLenth: bytes_received&nbsp;|&nbsp;&#39;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;responseLength:&nbsp;bytes_sent | dealTime: session_time&nbsp;|&nbsp;forwardAddr:&nbsp;upstream_addr | '
                           'forwardConnectTime: upstream_connect_time&nbsp;|&nbsp;forwardReqLength:&nbsp;upstream_bytes_sent | '
                           'forwardResLength: upstream_bytes_received&nbsp;|&nbsp;test:&nbsp;time_iso8601';
 
      #connection limit
      limit_conn_zone $binary_remote_addr zone=ip_addr_limit:50m;
      


      include /home/xxx/xxxx/nginx/conf/forward/port.conf;
      include /home/xxxx/xxxxx/nginx/conf/forward/proxy.conf;


}