windows安裝Nginx,並開啟的目錄檔案清單功能

來源:互聯網
上載者:User

標籤: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,並開啟的目錄檔案清單功能

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.