久久精品精选,精品九九视频,www久久只有这里有精品,亚洲熟女乱色综合一区
    分享

    Nginx主模塊選項

     笑觀云卷云舒 2017-10-14

    Nginx主模塊

    這里是控制 Nginx 的基本功能的指令.

    指令

    • [#daemon daemon]
    • [#debug_points debug_points]
    • [#error_log error_log]
    • [#include include]
    • [#lock_file lock_file]
    • [#master_process master_process]
    • [#pid pid]
    • [#ssl_engine ssl_engine]
    • [#timer_resolution timer_resolution]
    • [#user user group]
    • [#worker_cpu_affinity worker_cpu_affinity]
    • [#worker_priority worker_priority]
    • [#worker_processes worker_processes]
    • [#worker_rlimit_core worker_rlimit_core]
    • [#worker_rlimit_nofile worker_rlimit_nofile]
    • [#worker_rlimit_sigpending worker_rlimit_sigpending]
    • [#working_directory working_directory]

    daemon

    語法: daemon on | off

    缺省值: on

    daemon  off;
    

    Do not use the "daemon" and "master_process" directives in a production mode, these options are mainly used for development only. You can usedaemon offsafely in production mode with runit / daemontools however you can't do a graceful upgrade.master_process offshould never be used in production.

    生產環境中不要使用"daemon"和"master_process"指令,這些選項僅用于開發調試。

    debug_points

    語法: debug_points [stop | abort]

    缺省值: none

    debug_points stop;
    

    There are some assertion points inside nginx that allow to stop nginx to attach the debugger, or to abort and to create the core file.

    應該適用于調試,在調試器內設置斷點之類的。

    error_log

    語法: error_log file [ debug | info | notice | warn | error | crit ]

    缺省值: ${prefix}/logs/error.log

    Nginx 添加--with-debug 編譯參數, 你還能夠使用以下配置:

    error_log LOGFILE [ debug_core | debug_alloc | debug_mutex | debug_event
    ]: | debug_http | debug_imap ;
    

    include

    語法: include file | *

    缺省值: none

    你可以在任意地方使用include指令實現配置文件的包含,類似于apache中的include方法,可減少主配置文件d。

    include指令還支持像下面配置一樣的全局包含的方法,例如包含一個目錄下所有以".conf"結尾的文件:

    include vhosts/*.conf;
    

    注意路徑受到configure編譯參數--prefix=<路徑>指令的影響,如果沒有指定,Nginx默認是被編譯在/usr/local/nginx。

    語法: lock_file file

    缺省值: compile-time option

    lock_file  /var/log/lock_file;
    

    nginx uses accept mutex to serialize accept() syscalls. If nginx is built by gcc, Intel C++, or SunPro C++ compilers on i386, amd64, sparc64, and ppc64, then nginx uses the atomic instructions to implement the mutex. In other cases the lock file would be used.

    master_process

    語法: master_process on | off

    缺省值: on

    master_process  off;
    

    Do not use the "daemon" and "master_process" directives in a production mode, these options are mainly used for development only.

    生產環境中不要使用"daemon"和"master_process"指令,這些選項僅用于開發調試。

    pid

    語法: pid file

    缺省值: compile-time option Example:

    pid /var/log/nginx.pid;
    

    進程id存儲文件。可以使用 kill -HUPcat /var/log/nginx.pid\對Nginx進行配置文件重新加載。

    ssl_engine

    語法: ssl_engine engine

    缺省值: system dependent

    Here you can set your preferred openssl engine if any available. You can figure out which one do you have with the commandline tool:

    該指令用于指定openssl使用的引擎。你可以通過下面的命令行獲知系統目前支持的openssl引擎

    openssl engine -t

    例如:

    $ openssl engine -t
    (cryptodev) BSD cryptodev engine
    : [ available ] 
    (dynamic) Dynamic engine loading support
    : [ unavailable ] 
    

    timer_resolution

    語法: timer_resolution t

    缺省值: none

    Example:

    timer_resolution  100ms;
    

    The directive allows to decrease number gettimeofday() syscalls. By default gettimeofday() is called after each return from kevent(), epoll, /dev/poll, select(), poll().

    But if you need an exact time in logs when logging $upstream_response_time, or $msec variables, then you should usetimer_resolution.

    user

    語法: user user [group]

    缺省值: nobody nobody

    指定Nginx Worker進程運行用戶,默認是nobody賬號。

    例如:

    user www users;
    

    worker_cpu_affinity

    語法: worker_cpu_affinity cpumask [cpumask...]

    缺省值: none

    Linux only.

    With this option you can bind the worker process to a CPU, it calls sched_setaffinity().

    僅適用于linux,使用該選項可以綁定worker進程和CPU.

    For example,

    worker_proceses     4;
    worker_cpu_affinity 0001 0010 0100 1000;
    

    Bind each worker process to one CPU only.

    分別給每個worker進程綁定一個CPU.

    worker_proceses     2;
    worker_cpu_affinity 0101 1010;
    

    Bind the first worker to CPU0/CPU2, bind the second worker to CPU1/CPU3. This is suitable for HTT.

    將CPU0/CPU2綁定給第一個worker進程,將CPU1/CPU3綁定給第二個worker進程。

    worker_priority

    語法: worker_priority [-] number

    缺省值: on

    With this option you can give to all worker processes the priority (nice) you need/wish, it calls setpriority().

    使用該選項可以給所有的worker進程分配優先值。

    worker_processes

    語法: worker_processes number

    缺省值: 1

    e.g.:

    worker_processes 5;
    

    nginx has the ability to use more than one worker process for several reasons:

    nginx可以使用多個worker進程,原因如下:

    1. to use SMP
    2. to decrease latency when workers blockend on disk I/O
    3. to limit number of connections per process when select()/poll() is used

    Theworker_processesandworker_connectionsfrom the event sections allows you to calculatemaxclientsvalue: k

    max_clients = worker_processes * worker_connections

    worker_rlimit_core

    語法: worker_rlimit_core size

    缺省值: '

    Maximum size of core file per worker;

    worker_rlimit_nofile

    語法: worker_rlimit_nofile limit 缺省值: '

    Specifies the value for maximum file descriptors that can be opened by this process.

    指定

    worker_rlimit_sigpending

    語法: worker_rlimit_sigpending limit 缺省值: '

    (Since Linux 2.6.8) Specifies the limit on the number of signals that may be queued for the real user ID of the calling process.

    working_directory

    語法: working_directory path 缺省值: --prefix

    This is the working directory for the workers. It's used for core files only. nginx uses absolute paths only, all relative paths in configuration files are relative to--prefix==PATH

      本站是提供個人知識管理的網絡存儲空間,所有內容均由用戶發布,不代表本站觀點。請注意甄別內容中的聯系方式、誘導購買等信息,謹防詐騙。如發現有害或侵權內容,請點擊一鍵舉報。
      轉藏 分享 獻花(0

      0條評論

      發表

      請遵守用戶 評論公約

      類似文章 更多

      主站蜘蛛池模板: 日韩激情一区二区三区| 亚洲日韩性欧美中文字幕| 国产性一交一乱一伦一色一情| 成人啪精品视频网站午夜| 国产偷国产偷亚洲清高APP| 强奷乱码中文字幕熟女导航| 国产精品福利中文字幕| 暖暖 在线 日本 免费 中文| 精品无码一区二区三区在线| 好紧好滑好湿好爽免费视频| 国产揄拍国产精品| 欧美XXXX色视频在线观看| 成人免费A级毛片无码片2022| 无码人妻一区二区三区免费N鬼沢| 亚洲中文久久久精品无码| 一本一本久久A久久精品综合不卡| 精品黑人一区二区三区| 无套内谢少妇毛片在线| 久久精品国产亚洲精品2020| 少妇AV射精精品蜜桃专区| 国产成人午夜精品影院| 红杏亚洲影院一区二区三区| 中国熟妇毛多多裸交视频| 老熟妇高潮一区二区三区 | 欧美福利电影A在线播放| 久久久亚洲AV波多野结衣| 日本高清中文字幕免费一区二区| 色偷偷888欧美精品久久久| 日本熟妇XXXX潮喷视频| 波多野结AV衣东京热无码专区 | 亚洲av日韩av永久无码电影| 三级网站视频在在线播放| 四虎永久免费精品视频| 国产精品自在线拍国产| 亚洲中文字幕日产无码成人片| 精品无码久久久久久久动漫| 国产明星精品无码AV换脸| 国产又大又硬又粗| 色妞色综合久久夜夜| 日韩激情一区二区三区| 亚洲AV中文无码乱人伦在线咪咕|