nginx的windows配置

來源:互聯網
上載者:User


#Nginx所用使用者和組,window下不指定  #user  niumd niumd;    #工作的子進程數量(通常等於CPU數量或者2倍於CPU)  worker_processes  8;    #錯誤記錄檔存放路徑  #error_log  logs/error.log;  #error_log  logs/error.log  notice;  error_log  logs/error.log  info;    #指定pid存放檔案  pid        logs/nginx.pid;    events {      #使用網路IO模型linux建議epoll,FreeBSD建議-www.2cto.com-採用kqueue,window下不指定。       #use epoll;            #允許最大串連數      worker_connections  2048;  }    http {      include       mime.types;      default_type  application/octet-stream;            #定義日誌格式      #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  3m;      client_body_timeout    3m;      send_timeout           3m;         client_header_buffer_size    1k;      large_client_header_buffers  4 4k;        sendfile        on;      tcp_nopush      on;      tcp_nodelay     on;        #keepalive_timeout  75 20;        #include    gzip.conf;      upstream localhost {        #根據ip計算將請求分配各那個後端tomcat,許多人誤認為可以解決session問題,其實並不能。        #同一機器在多網情況下,路由切換,ip可能不同        #ip_hash;         server localhost:8080;        #server localhost:18080;       }        server {              listen       80;              server_name  localhost;                   location / {                           proxy_pass http://localhost;              }                   }  }     作者 zhyxfancy

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.