[Linux] Server比較

想到一般opensource使用的server有apache, lighttpd跟nginx, 可要比較卻不知道有哪些該注意的, 這邊紀錄一下.
(市面上常用的web servers)

1. Apache是process-based, nginx跟lighttpd是event-based.
   差別: asynchronous
   event-based優勢: less memory used, scalability
2. 一般web server擁有的feature:
   2.1 Static file serving
   2.2 SSL/TLS support
   2.3 Virtual hosts
   2.4 Reverse proxying
   2.5 Load balancing
   2.6 Compression
   2.7 Access controls
   2.8 URL rewriting
   2.9 Custom logging
   2.10 server-side include
   2.11 webDAV
   2.12 flv string
   2.13 FastCGI
   *Apache 雖然肥滋滋,但擁有幾個不錯的功能
      1. 網頁管理
   2. http 驗證
      3. http 1.1 support
      4. 強大的httpd.conf
3. 至於nginx v.s. lighttpd
   3.1 IPv6
        L: built-in support
       N: in work
   3.2 FastCGI/CGI
       L: built-in support, BUT not support large files
       N: FastCGI supported(but not primitive, need external module); CGI: not supported.
            NOT support keep-alive.
   3.3  Memcached
      L: supported, but need external module.
      N: built-in support.
   3.4  X-sendfile (這功能是指允許web app或script 透過web傳送檔案, 加在header裡面)
   3.5 Error logging per virtual server
      L: refused by author (窘)
      N: built-in support
   3.6 Community
      L: Many
      N: poor
   3.7 有個比較深入的比較連結,紀錄一下,雖然目前我看不太懂xD
 
總結根據需求考量,lighttpd比較適合,不過在靜態網頁存取上,nginx真的挺威的,有機會在試試好。

另外複習一下幾個terns...
1. vhosts: 又分為 name-based 與 IP-based virtual hosts,  大多指前者.  是指將多個Domain架在同一個IP上。
EX.  (參考)

DocumentRott /www/ggCookie
Servername www.ggCookie.com
...


DocumentRott /www/ggSports
Servername www.ggSports.com
...

2. URLRewrie URL複寫.主要是REST的一種相關技術, 將URL進行轉換在代入web server, 好處是隱藏參數, 避免網路惡意收集到使用者資訊.

3. FastCGI  主要是解決CGI行程持續性與隔離其他CGI介入等問題的。

Comments

Popular posts from this blog

股票評價(Stock Valuation) - 股利折現模型

openwrt feed的使用

How to convert Markdown into HTML