# Users and groups used by Nginx, not specified in the window # user niumd; # Number of working sub-processes (usually equal to the number of CPUs or twice the CPU) worker_processes 8; # error log storage path # error_log logs/error. log; # error_log logs/error. log notice; error_log logs/error. log info; # specify the pid to store the file pid logs/nginx. pid; events {# epoll is recommended for linux using the network I/O model. FreeBSD recommends that epoll be used for -www.2cto.com-And kqueue, which is not specified for Windows. # Use epoll; # maximum number of connections allowed worker_connections 2048;} http {include mime. types; default_type application/octet-stream; # define log format # log_format main '$ remote_addr-$ remote_user [$ time_local] $ request' #' "$ status" $ body_bytes_sent "$ http_referer" '#' "$ http_user_agent "" $ http_x_forwarded_for "'; # access_log off; access_log logs/access. log; client_header_timeout 3 m; client_body_timeout 3 m; send_timeout 3 m; Client_header_buffer_size 1 k; large_client_header_buffers 4 4 k; sendfile on; tcp_nopush on; tcp_nodelay on; # keepalive_timeout 75 20; # include gzip. conf; upstream localhost {# allocate requests to the backend tomcat Based on ip computing. Many people mistakenly believe that the session problem can be solved. # The ip address of a route switch may be different for multiple networks of the same machine # ip_hash; server localhost: 8080; # server localhost: 18080;} server {listen 80; server_name localhost; location/{proxy_pass http: // localhost ;}} author zhyxfancy