日本好好热aⅴ|国产99视频精品免费观看|日本成人aV在线|久热香蕉国产在线

  • <cite id="ikgdy"><table id="ikgdy"></table></cite>
    1. 西西軟件園多重安全檢測下載網(wǎng)站、值得信賴的軟件下載站!
      西西首頁 電腦軟件 安卓軟件 電腦游戲 安卓游戲 排行榜 專題合集

      Nginx

      v1.27.1 官方穩(wěn)定版
      • Nginxv1.27.1 官方穩(wěn)定版
      • 軟件大小:1.7M
      • 更新時間:2024-09-13 14:57
      • 軟件語言:英文
      • 軟件廠商:
      • 軟件類別:國外軟件 / 免費軟件 / 服務(wù)器區(qū)
      • 軟件等級:4級
      • 應(yīng)用平臺:WinAll, Win7
      • 官方網(wǎng)站:http://nginx.org/en/download.html
      • 應(yīng)用備案:
      好評:50%
      壞評:50%

      軟件介紹

      nginx(發(fā)音同engine x)是一款由俄羅斯程序員Igor Sysoev所開發(fā)輕量級的網(wǎng)頁服務(wù)器、反向代理服務(wù)器以及電子郵件(IMAP/POP3)代理服務(wù)器。起初是供俄國大型的門戶網(wǎng)站及搜索引擎Rambler(俄語:Рамблер)使用。此軟件BSD-like協(xié)議下發(fā)行,可以在UNIX、GNU/Linux、BSD、Mac OS X、Solaris,以及Microsoft Windows等操作系統(tǒng)中運行。

      nginx不單可以作為強大的web服務(wù)器,也可以作為一個反向代理服務(wù)器,而且nginx還可以按照調(diào)度規(guī)則實現(xiàn)動態(tài)、靜態(tài)頁面的分離,可以按照輪詢、ip哈希、URL哈希、權(quán)重等多種方式對后端服務(wù)器做負載均衡,同時還支持后端服務(wù)器的健康檢查。

      更新日志:

      Nginx 1.7.7 發(fā)布了,下載地址:

      改進記錄包括:

      *) Change: now nginx takes into account the "Vary" header line in a

         backend response while caching.

      *) Feature: the "proxy_force_ranges", "fastcgi_force_ranges",

         "scgi_force_ranges", and "uwsgi_force_ranges" directives.

      *) Feature: the "proxy_limit_rate", "fastcgi_limit_rate",

         "scgi_limit_rate", and "uwsgi_limit_rate" directives.

      *) Feature: the "Vary" parameter of the "proxy_ignore_headers",

         "fastcgi_ignore_headers", "scgi_ignore_headers", and

         "uwsgi_ignore_headers" directives.

      *) Bugfix: the last part of a response received from a backend with

         unbufferred proxy might not be sent to a client if "gzip" or "gunzip"

         directives were used.

      *) Bugfix: in the "proxy_cache_revalidate" directive.

         Thanks to Piotr Sikora.

      *) Bugfix: in error handling.

         Thanks to Yichun Zhang and Daniil Bondarev.

      *) Bugfix: in the "proxy_next_upstream_tries" and

         "proxy_next_upstream_timeout" directives.

         Thanks to Feng Gu.

      *) Bugfix: nginx/Windows could not be built with MinGW-w64 gcc.

         Thanks to Kouhei Sutou.

      web服務(wù)器Nginx發(fā)布1.6.2。2014-09-16。上個版本2014-08-05的1.6.1 遺留穩(wěn)定版1.4.7/1.2.9/1.0.15.開發(fā)版1.7.5 修正了一個SSL相關(guān)的安全漏洞(CVE-2014-3616),以及兩個DNS可能導致請求掛起B(yǎng)ug(1.5.8引入)。

      nginx開發(fā)團隊還同步發(fā)布了nginx 1.7.0主線版本,新特性如下:

      后端SSL證書驗證

      當使用SSL后端時,支持SNI(服務(wù)器名稱標識符)

      Nginx頂級網(wǎng)站用量超越Apache位居第一

      據(jù)W3Techs統(tǒng)計數(shù)據(jù)顯示,全球Alexa排名前100萬的網(wǎng)站中的23.3%都在使用nginx,在排名前10萬的網(wǎng)站中,這一數(shù)據(jù)為30.7%,而在前1000名的網(wǎng)站中,nginx的使用量超過了Apache,位居第1位。

      Nginx負載均衡一些基礎(chǔ)知識:

      nginx 的 upstream目前支持 4 種方式的分配 
      1)、輪詢(默認) 
      每個請求按時間順序逐一分配到不同的后端服務(wù)器,如果后端服務(wù)器down掉,能自動剔除。 
      2)、weight 
      指定輪詢幾率,weight和訪問比率成正比,用于后端服務(wù)器性能不均的情況。 
      2)、ip_hash 
      每個請求按訪問ip的hash結(jié)果分配,這樣每個訪客固定訪問一個后端服務(wù)器,可以解決session的問題。 
      3)、fair(第三方) 
      按后端服務(wù)器的響應(yīng)時間來分配請求,響應(yīng)時間短的優(yōu)先分配。 
      4)、url_hash(第三方)

      按訪問的url的hash結(jié)果分配,使每個url定向到同一個后端服務(wù)器,后端為緩存服務(wù)器比較有效。

      配置:

      在http節(jié)點里添加:

      #定義負載均衡設(shè)備的 Ip及設(shè)備狀態(tài) 

      upstream myServer {

      server 127.0.0.1:9090 down; 
      server 127.0.0.1:8080 weight=2; 
      server 127.0.0.1:6060; 
      server 127.0.0.1:7070 backup; 
      }

      在需要使用負載的Server節(jié)點下添加

      proxy_pass http://myServer;

      upstream 每個設(shè)備的狀態(tài):

      down 表示單前的server暫時不參與負載 
      weight 默認為1.weight越大,負載的權(quán)重就越大。 
      max_fails :允許請求失敗的次數(shù)默認為1.當超過最大次數(shù)時,返回proxy_next_upstream 模塊定義的錯誤 
      fail_timeout:max_fails 次失敗后,暫停的時間。 
      backup: 其它所有的非backup機器down或者忙的時候,請求backup機器。所以這臺機器壓力會最輕。

      Nginx還支持多組的負載均衡,可以配置多個upstream 來服務(wù)于不同的Server.

      配置負載均衡比較簡單,但是最關(guān)鍵的一個問題是怎么實現(xiàn)多臺服務(wù)器之間session的共享

      windows和Linux下配置Nginx負載的寫法一樣,故不分開介紹.

      啟動

      綠色文件,無須安裝,直接即可啟動。

      據(jù)我所知,3種啟動途徑,其實都類似:

      一、雙擊nginx.exe圖標,可見黑窗口一閃而過,啟動完畢。

      二、命令行到nginx目錄,輸入nginx啟動。(注,此方式命令行窗口無任何提示,且被鎖定)

      三、命令行到nginx目錄,輸入start nginx啟動,此方式不鎖定

      啟動后,默認情況下(無修改配置),可見到有兩個nginx的進程,一個是master process,一個是worker processes。

      測試

      默認nginx部署了些靜態(tài)內(nèi)容,我們可通過它測試nginx是否在工作。

      默認的配置文件(NGINX_HOME/conf/nginx.conf)如下:

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

      }

      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  logs/access.log  main;

          sendfile        on;

          #tcp_nopush     on;

          #keepalive_timeout  0;

          keepalive_timeout  65;

          #gzip  on;

          server {

              listen       80;

              server_name  localhost;

              #charset koi8-r;

              #access_log  logs/host.access.log  main;

              location / {

                  root   html;

                  index  index.html index.htm;

              }

              #error_page  404              /404.html;

              # redirect server error pages to the static page /50x.html

              #

              error_page   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 ssl;

          #    server_name  localhost;

          #    ssl_certificate      cert.pem;

          #    ssl_certificate_key  cert.key;

          #    ssl_session_cache    shared:SSL:1m;

          #    ssl_session_timeout  5m;

          #    ssl_ciphers  HIGH:!aNULL:!MD5;

          #    ssl_prefer_server_ciphers  on;

          #    location / {

          #        root   html;

          #        index  index.html index.htm;

          #    }

          #}

      }

      通過觀察配置文件的非注釋項(參考Nginx配置文件nginx.conf中文詳解),大概可知:

      1、啟動了1個worker processes

      2、worker_connections,最大并發(fā)數(shù)為1024

      3、include mime.types,引入mime.types文件所聲明的文件擴展名與文件類型映射

      4、application/octet-stream,默認使用application/octet-stream

      5、sendfile,開啟高效文件傳輸模式

      6、監(jiān)聽本機“l(fā)ocalhost”的80端口

      7、映射目錄為“當前目錄的html目錄”

      8、出現(xiàn)500、502、503、504錯誤,則映射到50x.html

      瀏覽地址http://localhost,即可訪問其默認頁面,即映射到NGINX_HOME/html/index.html

      其他靜態(tài)內(nèi)容,如html、圖片,可自行添加測試。

      日志

      日志默認位于NGINX_HOME/logs/,可見:

      1、access.log,訪問日志

      2、error.log,異常日志

      3、nginx.pid,進程(僅在啟動nginx后才有此日志)

      軟件截圖

      Nginx v1.27.1 官方穩(wěn)定版

      其他版本下載

      發(fā)表評論

      昵稱:
      表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
      查看所有(0)條評論 > 字數(shù): 0/500

      TOP
      軟件下載