<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      初識nginx+tomcat

      百度百科說:

      Nginx ("engine x") 是一個高性能的HTTP反向代理服務器,也是一個IMAP/POP3/SMTP服務器。Nginx是由Igor Sysoev為俄羅斯訪問量第二的Rambler.ru站點開發的,第一個公開版本0.1.0發布于2004年10月4日。其將源代碼以類BSD許可證的形式發布,因它的穩定性、豐富的功能集、示例配置文件和低系統資源的消耗而聞名。2011年6月1日,nginx 1.0.4發布。
      Nginx是一款輕量級Web 服務器/反向代理服務器及電子郵件(IMAP/POP3)代理服務器,并在一個BSD-like 協議下發行。由俄羅斯的程序設計師Igor Sysoev所開發,供俄國大型的入口網站及搜索引擎Rambler(俄文:Рамблер)使用。其特點是占有內存少,并發能力強,事實上nginx的并發能力確實在同類型的網頁服務器中表現較好,中國大陸使用nginx網站用戶有:百度、京東、新浪網易、騰訊、淘寶等。
       
       
      貼出完整的配置文件

      #運行用戶
      #user nobody;
      #此參數修改為與CPU個數一致
      worker_processes 1;
      #error_log logs/error.log;
      #error_log logs/error.log notice;
      #error_log logs/error.log info;

      pid logs/nginx.pid;

      #后添的
      worker_rlimit_nofile 51200;

      events {
      #單個后臺worker process進程的最大并發鏈接數
      worker_connections 51200;
      }
      #設定http服務器,利用它的反向代理功能提供負載均衡支持
      http {
      #設定mime類型,類型由mime.type文件定義
      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 logs/access.log main;

      server_names_hash_bucket_size 128;
      client_header_buffer_size 32k;
      large_client_header_buffers 4 32k;

       

       

      #充許客戶端請求的最大單個文件字節數
      client_max_body_size 10m;

      client_body_buffer_size 128k;

      #跟后端服務器連接的超時時間 s
      proxy_connect_timeout 5;

      #連接成功后等候后端服務器響應時間
      proxy_read_timeout 60;

      #后端服務器數據回傳時間
      proxy_send_timeout 30;

      #代理請求緩存區
      proxy_buffer_size 8k;

      #同上,保存用幾個buffer每個最大空間是多少
      proxy_buffers 4 32k;

      #如果系統很忙時可以申請更大的proxy_buffers,官方推薦*2
      proxy_busy_buffers_size 64k;

      #緩存臨時文件的大小
      proxy_temp_file_write_size 128k;


      #sendfile 指令指定 nginx 是否調用 sendfile 函數(zero copy 方式)來輸出文件,對于普通應用,
      #必須設為 on,如果用來進行下載等應用磁盤IO重負載應用,可設置為 off,以平衡磁盤與網絡I/O處理速度,降低系統的uptime.
      sendfile on;
      #tcp_nopush on;

      #連接超時時間
      #keepalive_timeout 0;
      keepalive_timeout 60;



      tcp_nodelay on;
      #開啟gzip壓縮
      #gzip on;
      # gzip_disable "MSIE [1-6]\.(?!.*SV1)";

      #gzip on;
      #gzip_min_length 1k;
      #gzip_buffers 4 16k;
      #gzip_http_version 1.1;
      #gzip_comp_level 2;
      #gzip_types text/plain application/x-javascript text/css application/xml;
      #gzip_vary on;

       


      upstream test_nginx {
      #ip_hash;
      least_conn; #最少連接
      server 127.0.0.1:8080 max_fails=2 fail_timeout=30s;
      server 192.168.137.128:8080 max_fails=2 fail_timeout=30s ;
      }

      server {
      listen 9999;#監聽的端口號 一般是80端口
      server_name test_nginx;

      proxy_redirect off;

      access_log logs/tset_nginx.log combined;
      #charset koi8-r;
      #access_log logs/host.access.log main;



      location / {
      root /root;#定義服務器的默認網站根目錄位置
      index index.html index.htm;
      proxy_pass http://test_nginx;
      proxy_set_header Host $host;
      proxy_set_header X-Real-Ip $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      }

      location /status{
      stub_status on;
      access_log off;
      auth_basic "NginxStatus";
      auth_basic_user_file htpasswd;
      }

      location ~ \.jsp$ {
      proxy_pass http://test_nginx;
      }

      location ~ \.(html|js|css|png|gif)$ {
      #root html;
      proxy_pass http://test_nginx;

      # root /var/www/virtual/htdocs;
      #過期30天,靜態文件不怎么更新,過期可以設大一點,如果頻繁更新,則可以設置得小一點。
      expires 30d;
      }

      #error_page 404 /404.html;
      # redirect server error pages to the static page /50x.html
      #
      error_page 404 500 502 503 504 /50x.html;
      location = /50x.html {
      root html;
      }

      # proxy the PHP scripts to Apache listening on 127.0.0.1:80
      #
      #location ~ \.php$ {
      # proxy_pass http://127.0.0.1;
      #}

      # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
      #
      #location ~ \.php$ {
      # root html;
      # fastcgi_pass 127.0.0.1:9000;
      # fastcgi_index index.php;
      # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
      # include fastcgi_params;
      #}

      # deny access to .htaccess files, if Apache's document root
      # concurs with nginx's one
      #
      #location ~ /\.ht {
      # deny all;
      #}
      }

      # another virtual host using mix of IP-, name-, and port-based configuration
      #
      #server {
      # listen 8000;
      # listen somename:8080;
      # server_name somename alias another.alias;

      # location / {
      # root html;
      # index index.html index.htm;
      # }
      #}


      # HTTPS server
      #
      #server {
      # listen 443;
      # server_name localhost;

      # ssl on;
      # ssl_certificate cert.pem;
      # ssl_certificate_key cert.key;

      # ssl_session_timeout 5m;

      # ssl_protocols SSLv2 SSLv3 TLSv1;
      # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
      # ssl_prefer_server_ciphers on;

      # location / {
      # root html;
      # index index.html index.htm;
      # }
      #}

      }

      常用命令 1 開啟nginx: start nginx    2 重新加載配置文件:nginx -s reload 3 關閉nginx  : nginx -s stop 
       
       
       
       
      posted @ 2016-08-15 17:30  冬天不眠  閱讀(166)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 九九热在线视频免费观看| 国产亚洲精品国产福APP| 国产精品成人午夜久久| 日本熟妇浓毛hdsex| 国产最大成人亚洲精品| 久久精品成人免费看| 国产美女久久久亚洲综合| 红杏av在线dvd综合| 亚洲sm另类一区二区三区| 一区二区三区四区在线不卡高清| 国产精品播放一区二区三区| 国语精品一区二区三区| 日韩va中文字幕无码电影| 亚洲国产高清av网站| 国产日韩精品一区在线不卡| 石首市| 内射老阿姨1区2区3区4区| 狠狠色噜噜狠狠狠狠色综合久av| 亚洲精品二区在线播放| 综合人妻久久一区二区精品| 伦理片午夜视频在线观看| 肥臀浪妇太爽了快点再快点| 国产精品亚洲国际在线看| 精品亚洲男人一区二区三区| 无码熟妇人妻av影音先锋| 久久99精品久久水蜜桃| 欧美精品一产区二产区| 九九久久自然熟的香蕉图片| 国产精品色内内在线观看| 一区二区三区av在线观看| 日韩欧美aⅴ综合网站发布| 成人做受120秒试看试看视频 | 东京热人妻无码一区二区av| 最新亚洲av日韩av二区| 亚洲精品一区二区美女| 又粗又硬又黄a级毛片| 国产成人综合久久亚洲精品| 久久久久久久久久久久中文字幕 | 亚洲色偷偷色噜噜狠狠99| 老妇xxxxx性开放| 通江县|