|
|
Posted on 10/20/2014 9:44:01 AM
|
|
|

pid = run/php-fpm.pid #pid设置, it is recommended to enable var/run/php-fpm.pid in the installation directory by default
error_log = log/php-fpm.log #错误日志, the default is var/log/php-fpm.log in the installation directory
log_level = notice #错误级别. The available levels are: alert, error, warning, notice, debug. Default: notice.
emergency_restart_threshold = 60 emergency_restart_interval = 60s # indicates that it appears within the value set by the emergency_restart_intervalSIGSEGVOr if the number of php-cgi processes with SIGBUS error exceeds emergency_restart_threshold, php-fpm will gracefully restart. These two options generally remain the default.
process_control_timeout = 0 #设置子进程接受主进程复用信号的超时时间. Available units: s (seconds), m (minutes), h (hours), or d (days) Default units: s (seconds). Default: 0.
daemonize = yes #后台执行fpm, the default value is yes, and if you want to debug, you can change it to no. In FPM, different settings can be used to run multiple process pools. These settings can be set individually for each process pool.
listen = 127.0.0.1:9000 #fpm监听端口, that is, the address processed by PHP in nginx, is generally the default value. The available formats are: 'ip:port', 'port', '/path/to/unix/socket'. Each process pool needs to be set up.
listen.backlog = -1 #backlog数, -1 means unlimited, determined by the operating system, just comment out this line. Reference: http://www.3gyou.cc/?p=41
listen.allowed_clients = 127.0.0.1 #允许访问FastCGI进程的IP, set any to not restrict IP, if you want to set the nginx of other hosts to access this FPM process, you need to set the IP address that can be accessed at the cost of listen. The default value is any. Each address is separated by a comma. If it is not set or is empty, any server is allowed to request a connection
listen.owner = www listen.group = www listen.mode = 0666 #unix socket setting option, if you use TCP to access, you can comment here.
user = www group = www #启动进程的帐户和组
pm = dynamic #对于专用服务器, pm can be set to static. #如何控制子进程, the options are static and dynamic. If static is selected, a fixed number of child processes is specified by pm.max_children. If dynamic is selected, it is determined by the following parameters: pm.max_children #, the maximum number of child processes pm.start_servers #, the number of processes at startup pm.min_spare_servers #, guarantee a minimum number of idle processes, and create a new child process if the idle process is less than this value pm.max_spare_servers#, ensure the maximum number of idle processes, if the idle process is greater than this value, this will be cleaned
pm.max_requests = 1000 #设置每个子进程重生之前服务的请求数. This is very useful for third-party modules that may have memory leaks. If set to '0', the request is always accepted. Equivalent to PHP_FCGI_MAX_REQUESTS environment variables. Default: 0.
pm.status_path = /status #FPM状态页面的网址. If you don't have the settings, you can't access the status page. Default: none. munin monitoring will be used
ping.path = /ping #FPM监控页面的ping网址. If you don't have the settings, you can't access the ping page. This page is used to externally detect whether the FPM is alive and can respond to requests. Note that it must start with a slash (/).
ping.response = pong #用于定义ping请求的返回相应. Returns text in text/plain format for HTTP 200. Default: pong.
request_terminate_timeout = 0 #设置单个请求的超时中止时间. This option may be useful for scripts that are not aborted for some special reason php.ini 'max_execution_time' in the settings. Set to '0' means 'Off'. You can try changing this option when 502 errors are frequently encountered.
request_slowlog_timeout = 10s #当一个请求该设置的超时时间后, the corresponding PHP call stack information will be written to the slow log. Set to '0' means 'Off'
slowlog = log/$pool.log.slow #慢请求的记录日志, use with request_slowlog_timeout
rlimit_files = 1024 #设置文件打开描述符的rlimit限制. Default value: The default open handle is 1024, which can be viewed with ulimit -n and modified by ulimit -n 2048.
rlimit_core = 0 #设置核心rlimit最大限制值. Available values: 'unlimited', 0 or positive integers. Default value: System-defined value.
chroot = #启动时的Chroot目录. The defined directory needs to be an absolute path. If there is no setting, the chroot is not used.
chdir = #设置启动目录, Chdir is automatically sent to that directory when it starts. The defined directory needs to be an absolute path. Default: current directory, or/directory (when chrooted)
catch_workers_output = yes #重定向运行过程中的stdout和stderr到主要的错误日志文件中. If not set, stdout and stderr will be redirected to /dev/null according to FastCGI's rules. Default: Null.
|
Previous:Puppet principle, deployment, installation and configuration of puttyNext:Configuration Management: Puppet Installation and Use (1)
|