Php-fpm.conf with detailed

Source: Internet
Author: User
PHP-FPM.CONF Configuration Detailed

Go to http://www.cnblogs.com/zoro/archive/2012/01/10/2317964.html.

?

Run-time configuration

The FPM configuration file is php-fpm.conf and its syntax is similar to php.ini.
PHP-FPM.CONF Global Configuration Segment PIDstring

The location of the PID file. The default is empty.
Error_logstring

The location of the error log. Default: Installation path #install_prefix#/log/php-fpm.log.
Log_levelstring

The error level. The available levels are: alert (which must be processed immediately), error (Error condition), warning (warning condition), notice (general important information), debug (debug information). Default: Notice.
Emergency_restart_thresholdint

FPM restarts if the child process receives a SIGSEGV or Sigbus exit information number for that parameter setting within the time set by Emergency_restart_interval.0Said'Turn off this feature'. Default value:0(Close).
Emergency_restart_interval Mixed

The emergency_restart_interval is used to set the interval between smooth restarts. Doing so helps to solve the problem of using shared memory in the accelerator. Available units: s (seconds), M (min), H (Hours), or D (Day). Default unit: s (seconds). Default value:0(Close).
Process_control_timeout Mixed

Sets the time-out period for the child process to accept the primary process multiplexing signal. Available units: s (seconds), M (min), H (Hours), or D (day) default units: s (seconds). Default value:0.
Daemonize Boolean

Set FPM to run in the background. Set up'No'Keep FPM running in the foreground for debugging. Default value: Yes.
Run configuration section

In FPM, you can use different settings to run multiple process pools. These settings can be set individually for each process pool.
Listenstring

Sets the address that accepts the FASTCGI request. Available formats are:'Ip:port','Port','/path/to/unix/socket'. Each process pool needs to be set.
Listen.backlogint

Set Listen (2) of the half-connection queue length.'-1'Represents no limit. Default value:-1.
Listen.allowed_clientsstring

Sets the server IPV4 address that is allowed to connect to fastcgi. Equivalent to PHP FastCGI (5.2.2+) in the FCGI_WEB_SERVER_ADDRS environment variable. Only works on TCP snooping. Each address is separated by commas. If it is not set or empty, any server is allowed to request a connection. Default value: Any.
Listen.ownerstring

If used, represents the permission to set UNIX sockets. In Linux, read and write permissions must be set to be used for Web server connections. In many BSD-derived systems, permissions can be ignored to allow free connections. Default value: The user who is running the lease, with a permission of 0666.
Listen.groupstring

See Listen.owner.
Listen.modestring

See Listen.owner.
Userstring

The FPM process runs as a UNIX user. Must be set.
Groupstring

The FPM process runs the UNIX user group. If not set, the default user's group is used.
Pmstring

Sets how the Process manager manages child processes. Available values:Static, dynamic. Must be set.

Static-The number of child processes is fixed (pm.max_children).

Dynamic-The number of child processes is dynamically set based on the following configuration: Pm.max_children, Pm.start_servers, Pm.min_spare_servers, Pm.max_spare_servers.
Pm.max_childrenint

Number of child processes, PM set toStaticRepresents the maximum can be created when the PM is set to dynamic when it is created. Must be set.

This option sets a limit on the number of requests that can be served at the same time. Similar to the maxclients settings in Apache mpm_prefork and the Php_fcgi_children environment variables in normal PHP fastcgi.
Pm.start_serversinch

Sets the number of child processes created at startup. Used only when the PM is set to dynamic. Default value: Min_spare_servers + (max_spare_servers-min_spare_servers)/2.
Pm.min_spare_serversint

Sets the minimum number of idle service processes. Used only when the PM is set to dynamic. Must be set.
Pm.max_spare_serversint

Sets the maximum number of idle service processes. Used only when the PM is set to dynamic. Must be set.
Pm.max_requestsint

Sets the number of requests for the service before each child process is reborn. is useful for third-party modules that may have a memory leak. If set to'0'The request is always accepted. Equivalent to the PHP_FCGI_MAX_REQUESTS environment variable. Default value:0.
Pm.status_pathstring

The URL of the FPM status page. If not set, the status page cannot be accessed. Default value: None.
Ping.pathstring

The ping URL of the FPM monitoring page. If not set, the ping page cannot be accessed. This page is used to externally detect whether FPM is alive and can respond to requests. Note that you must start with a slash (/).
Ping.responsestring

Used to define the return of the ping request accordingly. Return to HTTP $The Text/plain format text. Default value: Pong.
Request_terminate_timeout Mixed

Sets the time-out for a single request to abort. This option may be in the php.ini settings'Max_execution_time'Scripts that are not aborted for some special reasons are useful. Set to'0'Said'Off'. Available units:s (Econds) (default), M (inutes), H (ours), or D (ays). Default Value:0.
Request_slowlog_timeout Mixed

When a request for this setting time-out expires, the corresponding PHP call stack information is written to the slow log. Set to'0'Said'Off'. Available units: s (seconds) (default), m (min), H (Hours), or D (Day). Default value:0.
Slowlogstring

Logging of slow requests. Default value: #INSTALL_PREFIX #/log/php-fpm.log.slow.
Rlimit_filesint

Sets the Rlimit limit for the file open descriptor. Default value: System-defined value.
Rlimit_coreint

Sets the maximum limit value for the core rlimit. Available values:'Unlimited', 0, or a positive integer. Default value: System-defined value.
Chrootstring

The Chroot directory at startup. The defined directory needs to be an absolute path. If not set, Chroot is not used.
ChDirstring

Sets the startup directory, which is automatically chdir to the directory when it starts. The defined directory needs to be an absolute path. Default value: Current directory, or/directory (chroot).
Catch_workers_output Boolean

REDIRECT StdOut and stderr to the primary error log file during the run. If not set, stdout and stderr will be redirected to/dev/based on fastcgi rules.NULL. Default value: Empty.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    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.