| 一、下載 在http:///上下載(zip包)并解壓。 二、配置conf/nginx.conf文件 1.在conf目錄下新建一個"vhosts.conf"文本文件 2.將conf/nginx.con文件中server部分復制到vhosts.conf文件中,用"include vhosts.conf;"來取代原先server部分 3.在vhosts.conf中增加反向代理配置,如下: 
 server { listen 80; server_name localhost; location / { root html; index index.html index.htm; } location /google { proxy_pass http://www.google.com; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } 
 上面location /google部分是將/google 映射到http://www.google.com 
 四、啟動與關閉 用命令行進入nginx解壓位置,以下操作均為命令行操作。 1.啟動:nginx 2.關閉:nginx -s stop 如果關閉不掉,則直接在進程管理器中結束所有nginx.exe進程 | 
|  |