又記 1.3.16 到 Nginx 1.4.0


筆記升級 nginx 到 stable 1.4.0 版本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 切到自己的目錄
cd ~/downloads; mkdir 20130425; cd 20130425

# 下載 Nginx 1.4.0
wget http://nginx.org/download/nginx-1.4.0.tar.gz
tar zxvf nginx-1.4.0.tar.gz
cd nginx-1.4.0

# 安裝
./configure --prefix=/usr/local/nginx --user=www --group=www --with-select_module --with-poll_module --with-http_ssl_module --with-http_spdy_module --with-http_realip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_secure_link_module --with-http_stub_status_module --with-pcre
make; make install

# 修改 nginx.conf
server_tokens off

# 殺掉進程重啟
kill -HUP `cat /usr/local/nginx/logs/nginx.pid`

# 打開瀏覽器驗證一下 tokens 版本
# 完成修改回 nginx.conf 重啟就可以