標籤:windows nginx 目錄 瀏覽 功能
一、windows安裝nginx
1、下載windows版的nginx安裝包
:http://nginx.org/download/nginx-1.10.2.zip
2、解壓到相應的目錄,比如我是c盤 然後修改目錄名字為nginx-1.10.2
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/8B/7D/wKiom1hPcOPgPAwsAAAELd5_-KE082.png-wh_500x0-wm_3-wmp_4-s_1059030053.png" title="clipboard.png" alt="wKiom1hPcOPgPAwsAAAELd5_-KE082.png-wh_50" />
3、進入nginx-1.10.2目錄 雙擊nginx.exe 來啟動nginx
650) this.width=650;" src="http://s2.51cto.com/wyfs02/M01/8B/7A/wKioL1hPiLWD7YR8AAA9EXHD1Jo439.png-wh_500x0-wm_3-wmp_4-s_3328536658.png" title="QQ20161213133509.png" alt="wKioL1hPiLWD7YR8AAA9EXHD1Jo439.png-wh_50" />
4、此時 直接在瀏覽器地址欄輸入:localhost 便能看到 歡迎頁面,說明你虛擬機器主機已經搭建好了。
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/8B/7A/wKioL1hPiY3gMeEEAABxv-3nU2o176.png-wh_500x0-wm_3-wmp_4-s_225414108.png" title="QQ20161213133840.png" alt="wKioL1hPiY3gMeEEAABxv-3nU2o176.png-wh_50" />
二、開啟目錄訪問功能。
1、進行修改nginx的設定檔,nginx的設定檔在conf目錄下的nginx.conf。
開啟nginx.conf檔案。進行如下修改:
650) this.width=650;" src="http://s4.51cto.com/wyfs02/M02/8B/7A/wKioL1hPjQ-Tj0G_AABTPPn_jV8292.png-wh_500x0-wm_3-wmp_4-s_3562556551.png" title="QQ20161213135349.png" alt="wKioL1hPjQ-Tj0G_AABTPPn_jV8292.png-wh_50" />
註: 1、需要Nginx開啟索引功能,具體開啟方法是在Nginx的網站設定檔的http或者server段加上“autoindex on;”。這樣就算開啟了Nginx的瀏覽目錄功能。
2、如果需要訪問的目錄或檔案有中文,則要在nginx的設定檔添加
charset utf-8,gbk;進行字元集的設定。
2、重新啟動nginx,進行訪問。
650) this.width=650;" src="http://s2.51cto.com/wyfs02/M00/8B/7D/wKiom1hPjfLDlGwSAAAcCNVCM9w607.png-wh_500x0-wm_3-wmp_4-s_2158203885.png" title="QQ20161213135752.png" alt="wKiom1hPjfLDlGwSAAAcCNVCM9w607.png-wh_50" />
本文出自 “round” 部落格,轉載請與作者聯絡!
windows安裝Nginx,並開啟的目錄檔案清單功能