rfc:fpm:ini_syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:fpm:ini_syntax [2010/03/30 13:56] fatrfc:fpm:ini_syntax [2010/03/30 17:15] fat
Line 1: Line 1:
-====== Request for Comments: FPM SAPI inclusion ======+====== Request for Comments: FPM INI Syntax ======
   * Version: 1.0   * Version: 1.0
   * Date: 2010-03-30   * Date: 2010-03-30
Line 23: Line 23:
   * At least one **worker** section wich includes:   * At least one **worker** section wich includes:
     * specific simple directives (user=, group=, status=, ...)     * specific simple directives (user=, group=, status=, ...)
-    * specific array directives (env[PATH]=, defines[sendmail_path]=, ...) +    * specific array directives (environment[PATH]=, php_define[sendmail_path]=, ...) 
-    reference system. A worker can be set as a reference and it'll never be instantiated. Classic workers can use it to defined default values. For exemple, timeout directive are set once in a reference worker and normal workers will use this worker as a reference.+  reference system. A worker can be set as a reference and it'll never be instantiated. Classic workers can use it to define default values. For exemple, timeout directives are set once in a reference worker and normal workers will use this worker as a reference.
  
 ===== Implementation ===== ===== Implementation =====
 I propose to implement the previous requirements this way: I propose to implement the previous requirements this way:
-  * The include directive is a simple key/value. The key is called **include**. The value is a pattern recognized by [[http://www.cl.cam.ac.uk/cgi-bin/manpage?3+glob|glob(3)]]. With glob(3), a simple file can be set, but also a bunch of file at once (/etc/fpm.d/*.conf)+  * The include directive is a simple key/value. The key is named **include**. The value is a pattern recognized by [[http://www.cl.cam.ac.uk/cgi-bin/manpage?3+glob|glob(3)]]. With glob(3), a simple file can be set, but also a bunch of file at once<code>include=/etc/fpm.d/www.my.site.com.conf 
-  * The global section can start with an INI section called globals <code>[globals]</code>. This INI section is not mandatory if directives are set before any other INI sections. +include=/etc/fpm.d/*.conf</code> 
-  * Workers start with a INI section. The value of the section is called with the name of the worker. <code>[www.my.site.com]</code>. All the following directives are related to this worker until another INI section starts a new worker. +  * The global section can start with an INI section named globals. This INI section is not mandatory if directives are set before any other INI sections. <code>[globals]</code> 
-    * directive to set the worker as a reference. It's called **is_a_reference** and can be set to yes or no. <code>is_a_reference=yes</code>.(incompatible with **reference**). +  * Simple directive values are simple key/value pairs.<code>daemonize = yes</code> 
-    * a directive to set the reference to use. It'called **reference** and can be set to any worker set as a reference by **is_a_reference**. <code>reference=default</code>. (incompatible with **is_a_reference**)+  * Array directive values are arrays of key/value pairs.<code>environment[PATH] = /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin 
-\\ +php_define[sendmail_path] = /bin/mini_sendmail -t -i -fwww@my.site.com</code> 
-\\ +  * Workers starts with a INI section. The value of the section is named with the worker's name. All the following directives are related to this worker until another INI section starts a new worker.<code>[www.my.site.com]</code> 
-__**The RFC is not yet finished.**__+    * The directive **is_a_reference** set the current worker as a reference. It can be set to yes or no. <code>is_a_reference=yes   ; incompatible with reference</code> 
 +    * The directive **reference** set the worker to use as a reference. It'named **reference** and can be set to any worker set as a reference by **is_a_reference**. <code>reference=default   ; incompatible with is_a_reference</code> 
 + 
 +===== Yet known directives ===== 
 +==== Global directives ==== 
 +  * **daemonize**Set to yes/no. Default to yes. Does FPM run as a standalone daemon or stays in foreground (debugging purpose). 
 +  * **pid_file**. Set to PID file location. 
 +  * **error_log**. Set to error file location. 
 +  * **log_level**. Set the log_level: notice, warn, error or alert. 
 +  * **process_control_timeout**. Set a time value. 
 +  * **emergency_restart_interval**. Set a time value. 
 +  * **emergency_restart_threshold**. Set a time value. 
 + 
 +==== Worker directives ==== 
 +  * **user**. 
 +  * **group**. 
 +  * **pm.style**. 
 +  * **pm.dynamic.start_servers**. 
 +  * **pm.dynamic.min_spare_servers**. 
 +  * **pm.dynamic.max_spare_servers**. 
 +  * **pm.max_children**. 
 +  * **listen_address**. 
 +  * **listen.backlog**. 
 +  * **listen.owner**. 
 +  * **listen.group**. 
 +  * **listen.mode**. 
 +  * **status**. 
 +  * **ping**. 
 +  * **pong**. 
 +  * **php_define[]**. 
 +  * **chroot**. 
 +  * **chdir**. 
 +  * **allowed_clients**. 
 +  * **environment[]**. 
 +  * **request_terminate_timeout**. 
 +  * **request_slowlog_timeout**. 
 +  * **slowlog**. 
 +  * **rlimit_core**. 
 +  * **rlimit_files**. 
 +  * **max_requests**. 
 +  * **catch_worker_output**. 
 +===== Not yet known directives ===== 
 +  * **include**. 
 +  * **reference**. 
 +  * **is_a_reference**. 
 +===== Rename directive proposal ===== 
 +In this section, I want to propose to rename some of the yet know directives. 
 +  * **pm.style** to **pm[mode]**. Set process manager directives into an array. Rename also style in mode which is more understandable, I think. 
 +  * **pm.dynamic.start_servers** to **pm[start_servers]**. As start_servers is only used with dynamic mode, it'not necessary to precise it's dynamic. 
 +  * **pm.dynamic.min_spare_servers** to **pm[min_spare_servers]**. Same as start_servers. 
 +  * **pm.dynamic.max_spare_servers** to **pm[max_spare_servers]**. Same as start_servers. 
 +  * **pm.max_children** to **pm[max_children]**. 
 +  * **status** to **pm[status]**. The status directive is directly related to PM as it's its status page. 
 +  * Set listen directives as an array, like PM: 
 +    * **listen[address]** 
 +    * **listen[backlog]** 
 +    * **listen[user]** 
 +    * **listen[group]** 
 +    * **listen[mode]** 
 +  * **ping** and **pong** to a ping array: 
 +    * **ping[path]** to set the ping path request (/ping) 
 +    * **ping[response]** to set the response from the previous request 
 +  * **max_requests** to **pm[max_requests]**. Move this directive to the PM array as it's directly related to PM. 
 +  * **environment[]** to **env[]**. The short word env is enough to understand and closer to reality (env shell command). 
 +  * **php_define[]** to **php_flag[]**, **php_value[]**, **php_admin_flag[]**, **php_admin_value[]**. This is the same syntax as the apache sapi. 
 +  * **allowed_clients** to **allowed_client[]** as there could be more than one allowed client.
  
 ===== Proposal and Patch ===== ===== Proposal and Patch =====
rfc/fpm/ini_syntax.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1