成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

LNMP架構(gòu)中Nginx服務(wù)配置文件的示例分析

這篇文章將為大家詳細(xì)講解有關(guān)LNMP架構(gòu)中Nginx服務(wù)配置文件的示例分析,小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。

創(chuàng)新互聯(lián)-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價(jià)比建陽(yáng)網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫(kù),直接使用。一站式建陽(yáng)網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋建陽(yáng)地區(qū)。費(fèi)用合理售后完善,10多年實(shí)體公司更值得信賴。

nginx的配置文件比較簡(jiǎn)單,但功能相當(dāng)強(qiáng)大,可以自由靈活的進(jìn)行相關(guān)配置,因此,還是了解下其配置文件的一此信息


1、Nginx服務(wù)目錄結(jié)構(gòu)介紹

安裝完成后,在安裝路徑下就會(huì)有Nginx目錄信息

[root@centos6 application]# tree nginx

nginx

+-- client_body_temp

+-- conf          #nginx服務(wù)配置文件目錄

|   +-- fastcgi.conf             #fastcgi配置文件

|   +-- fastcgi.conf.default

|   +-- fastcgi_params        #fastcgi參數(shù)配置文件

|   +-- fastcgi_params.default

|   +-- koi-utf

|   +-- koi-win

|   +-- mime.types

|   +-- mime.types.default

|   +-- nginx.conf                 #nginx服務(wù)的主配置文件

|   +-- nginx.conf.default    #nginx服務(wù)的默認(rèn)配置文件

|   +-- scgi_params

|   +-- scgi_params.default

|   +-- uwsgi_params

|   +-- uwsgi_params.default

|   +-- win-utf

+-- fastcgi_temp

+-- html       #編譯安裝nginx默認(rèn)的首頁(yè)配置文件目錄

|   +-- 50x.html           #錯(cuò)誤頁(yè)面配置文件

|   +-- index.html        #默認(rèn)的首頁(yè)配置文件

|   +-- index.html.bak

+-- logs      #日志配置文件目錄

|   +-- access.log      #訪問日志文件

|   +-- error.log          #錯(cuò)誤日志文件

+-- proxy_temp

+-- sbin     #命令目錄

|   +-- nginx               #Nginx服務(wù)啟動(dòng)命令

+-- scgi_temp    #臨時(shí)目錄     

+-- uwsgi_temp



2、Nginx服務(wù)主配置文件介紹

[root@centos6 conf]# egrep -v "#|^$" nginx.conf

worker_processes  1;      #工作進(jìn)程數(shù)

events {                           #事件

    worker_connections  1024;     #并發(fā)數(shù),單位時(shí)間內(nèi)最大連接數(shù)

}

http {

    include       mime.types;

    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;

    server {               #虛擬主機(jī)標(biāo)簽

        listen       80;   #監(jiān)聽的端口號(hào)

        server_name  localhost;     #服務(wù)器主機(jī)名

        location / {

            root   html;          #默認(rèn)站點(diǎn)目錄

            index  index.html index.htm;       #默認(rèn)首頁(yè)文件

        }

        error_page   500 502 503 504  /50x.html;    #錯(cuò)誤頁(yè)面文件

        location = /50x.html {

            root   html;

        }

    }

}



3、Nginx服務(wù)幫助信息

[root@centos6 conf]# /application/nginx/sbin/nginx -h

nginx version: nginx/1.10.1      #版本信息

Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]

Options:

  -?,-h         : this help

  -v            : show version and exit    

#顯示版本并退出

  -V            : show version and configure options then exit

#顯示版本信息與配置后退出

  -t            : test configuration and exit  

#檢查配置(檢查語(yǔ)法)

  -T            : test configuration, dump it and exit

  -q            : suppress non-error messages during configuration testing

  -s signal     : send signal to a master process: stop, quit, reopen, reload

  -p prefix     : set prefix path (default: /application/nginx-1.10.1/)

  -c filename   : set configuration file (default: conf/nginx.conf)

#指定配置文件,而非使用nginx.conf

  -g directives : set global directives out of configuration file



4、nginx編譯參數(shù)查看

[root@centos6 conf]# /application/nginx/sbin/nginx -v

nginx version: nginx/1.10.1

[root@centos6 conf]# /application/nginx/sbin/nginx -V

nginx version: nginx/1.10.1

built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) 

built with OpenSSL 1.0.1e-fips 11 Feb 2013

TLS SNI support enabled

configure arguments:

--user=nginx

--group=nginx

--prefix=/application/nginx-1.10.1

--with-http_stub_status_module

--with-http_ssl_module

-with-pcre=/download/tools/pcre-8.38

實(shí)際生產(chǎn)環(huán)境比較實(shí)用的查看參數(shù),比如服務(wù)非你自己所安裝,但又沒有相關(guān)文檔參考,此參數(shù)可以提供一些相關(guān)的信息

關(guān)于“LNMP架構(gòu)中Nginx服務(wù)配置文件的示例分析”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,使各位可以學(xué)到更多知識(shí),如果覺得文章不錯(cuò),請(qǐng)把它分享出去讓更多的人看到。

名稱欄目:LNMP架構(gòu)中Nginx服務(wù)配置文件的示例分析
網(wǎng)站地址:http://jinyejixie.com/article2/gpieic.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供標(biāo)簽優(yōu)化、手機(jī)網(wǎng)站建設(shè)、用戶體驗(yàn)網(wǎng)站營(yíng)銷、電子商務(wù)、商城網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站建設(shè)
调兵山市| 阳新县| 富锦市| 榆树市| 镇坪县| 红桥区| 胶州市| 濮阳县| 高安市| 津市市| 孝感市| 广丰县| 开封市| 泗水县| 辽阳市| 桐庐县| 明星| 邯郸市| 岐山县| 武穴市| 五大连池市| 金平| 封开县| 丰镇市| 赤壁市| 普格县| 肥西县| 奉节县| 双柏县| 琼中| 邵阳市| 东方市| 德令哈市| 罗山县| 旌德县| 隆安县| 威信县| 施甸县| 陆河县| 临湘市| 奈曼旗|