User Tools

Site Tools


nginxarchitecture

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nginxarchitecture [2017/03/24 05:58] – [PHP-FPM Config and Optimize] adminnginxarchitecture [2022/10/29 16:15] (current) – external edit 127.0.0.1
Line 28: Line 28:
 ===== Optimize nginx configuration for performance and benchmark ===== ===== Optimize nginx configuration for performance and benchmark =====
 refer: refer:
 +  * http://www.freshblurbs.com/blog/2015/11/28/high-load-nginx-config.html
   * http://tweaked.io/guide/nginx/   * http://tweaked.io/guide/nginx/
   * http://wiki.nginx.org/FullExample   * http://wiki.nginx.org/FullExample
Line 141: Line 142:
 refer:  refer: 
   * https://www.if-not-true-then-false.com/2011/nginx-and-php-fpm-configuration-and-optimizing-tips-and-tricks/   * https://www.if-not-true-then-false.com/2011/nginx-and-php-fpm-configuration-and-optimizing-tips-and-tricks/
-  * http://jeremymarc.github.io/2013/04/22/nginx-and-php-fpm-for-performance/+  * https://tweaked.io/guide/nginx/
  
 **global** config for all pools:<code> **global** config for all pools:<code>
Line 203: Line 204:
 /etc/php-fpm.d/blog.conf /etc/php-fpm.d/blog.conf
 /etc/php-fpm.d/forums.conf /etc/php-fpm.d/forums.conf
-</code> +</code> 
 +Or config in php-fpm.conf<code> 
 +; Relative path can also be used. They will be prefixed by: 
 +;  - the global prefix if it's been set (-p argument) 
 +;  - /onec/php otherwise 
 +;include=etc/fpm.d/*.conf 
 +</code>(Create directory **/onec/php/etc/fpm.d/**)
 Just example configurations for every pool:  Just example configurations for every pool: 
 +  * default pool [www](listen on port 9000)<code>
 +[www]
 +
 +; Per pool prefix
 +; It only applies on the following directives:
 +; - 'access.log'
 +; - 'slowlog'
 +; - 'listen' (unixsocket)
 +; - 'chroot'
 +; - 'chdir'
 +; - 'php_values'
 +; - 'php_admin_values'
 +; When not set, the global prefix (or /onec/php) applies instead.
 +; Note: This directive can also be relative to the global prefix.
 +; Default Value: none
 +;prefix = /path/to/pools/$pool
 +
 +; Unix user/group of processes
 +; Note: The user is mandatory. If the group is not set, the default user's group
 +;       will be used.
 +user = nobody
 +group = nobody
 +
 +; The address on which to accept FastCGI requests.
 +; Valid syntaxes are:
 +;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
 +;                            a specific port;
 +;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
 +;                            a specific port;
 +;   'port'                 - to listen on a TCP socket to all IPv4 addresses on a
 +;                            specific port;
 +;   '[::]:port'            - to listen on a TCP socket to all addresses
 +;                            (IPv6 and IPv4-mapped) on a specific port;
 +;   '/path/to/unix/socket' - to listen on a unix socket.
 +; Note: This value is mandatory.
 +listen = 127.0.0.1:9000
 +
 +</code>
   * /etc/php-fpm.d/site.conf<code>    * /etc/php-fpm.d/site.conf<code> 
 [site] [site]
nginxarchitecture.1490335089.txt.gz · Last modified: 2022/10/29 16:15 (external edit)