99偷拍视频精品区一区二,口述久久久久久久久久久久,国产精品夫妇激情啪发布,成人永久免费网站在线观看,国产精品高清免费在线,青青草在线观看视频观看,久久久久久国产一区,天天婷婷久久18禁,日韩动漫av在线播放直播

Nginx-Windows下Nginx基本安裝和配置

Nginx 是一個輕量級的高性能 Http WebServer,以事件驅動方式編寫,因此相比 Apache 而言,Nginx 更加穩定、性能更好,而且配置簡單,資源占用較低。

1. 安裝 Nginx
從 v0.7.52 開始,Nginx 開始發布 Windows 版本的 Nginx,你可以在其官方網站上面下載:http://nginx.net
下載后直接解壓即可,這里解壓縮到c:nginx目錄。

宜君網站建設公司創新互聯,宜君網站設計制作,有大型網站制作公司豐富經驗。已為宜君成百上千家提供企業網站建設服務。企業網站搭建\成都外貿網站建設公司要多少錢,請找那個售后服務好的宜君做網站的公司定做!

2. 啟動Nginx
命令行進入c:nginx目錄,運行nginx.exe,啟動控制臺窗口。默認啟用80端口。用過Tomcat的人都希望能在控制臺看到啟動日志,nginx的日志卻不得不查看logs目錄下的相應log文件。

3. 訪問歡迎html頁
在瀏覽器中訪問http://localhost,可以看到默認的歡迎頁.

4. 停止Nginx
Ctrl+C沒反應。于是關閉控制臺窗口。可是再訪問http://localhost依然有效。查看進程,發現nginx根本沒有被關閉。因此如果想徹底關閉nginx,應該是

Command代碼
nginx-sstop

請參考官方文檔 nginx/Windows usage
或者使用windows的taskkill命令:
Command代碼
taskkill/F/IMnginx.exe>nul


5. Ngnix常用配置
Nginx的所有配置都默認使用conf/nginx.conf文件,其地位相當于apache的httpd.conf文件 。當運行nginx.exe暗含運行了nginx -c confnginx.conf. 如果想使用自己定義的conf文件如my.conf,命令為nginx -c confmy.conf.
常用配置如下:
Nginx.conf代碼
http{ server{ #1.偵聽80端口 listen80; location/{ #2.默認主頁目錄在nginx安裝目錄的html子目錄。 roothtml; indexindex.htmlindex.htm; #3.沒有索引頁時,羅列文件和子目錄 autoindexon; autoindex_exact_sizeon; autoindex_localtimeon; } #4.指定虛擬目錄 location/tshirt{ aliasD:programsApache2htdocstshirt; indexindex.htmlindex.htm; } } #5.虛擬主機www.emb.info配置 server{ listen80; server_namewww.emb.info; access_logemb.info/logs/access.log; location/{ indexindex.html; rootemb.info/htdocs; } } }


小提示:
運行nginx -V可以查看該Win32平臺編譯版支持哪些模塊。我這里的結果為:
Log代碼
nginxversion:nginx/0.7.65 TLSSNIsupportenabled configurearguments: --builddir=objs.msvc8 --crossbuild=win32 --with-debug--prefix= --conf-path=conf/nginx.conf --pid-path=logs/nginx.pid --http-log-path=logs/access.log --error-log-path=logs/error.log --sbin-path=nginx.exe --http-client-body-temp-path=temp/client_body_temp --http-proxy-temp-path=temp/proxy_temp --http-fastcgi-temp-path=temp/fastcgi_temp --with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs.msvc8/lib/pcre-7.9 --with-openssl=objs.msvc8/lib/openssl-0.9.8k --with-openssl-opt=enable-tlsext --with-zlib=objs.msvc8/lib/zlib-1.2.3 --with-select_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_stub_status_module --with-http_flv_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-mail --with-mail_ssl_module --with-ipv6

顯然,最經常用的memcache, rewrite模塊都沒在其中,因此該win32編譯版本僅能供基本開發測試使用,對于產品平臺,應該重新編譯自己想要的win32版本,或者在linux下使用更方便。

nginx -s stop fast shutdown

nginx -s quit graceful shutdown

nginx -s reload changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes

nginx -s reopen re-opening log files

網站名稱:Nginx-Windows下Nginx基本安裝和配置
文章鏈接:http://www.yijiale78.com/article4/cpdsie.html

成都網站建設公司_創新互聯,為您提供響應式網站做網站微信公眾號動態網站商城網站ChatGPT

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

搜索引擎優化