{"id":353,"date":"2023-06-20T14:13:27","date_gmt":"2023-03-21T01:21:18","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/"},"modified":"2025-07-31T22:54:40","modified_gmt":"2025-07-31T13:54:40","slug":"php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","title":{"rendered":"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5"},"content":{"rendered":"<p>PHP-FPM\uff08FastCGI\u30d7\u30ed\u30bb\u30b9\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\uff09\u306f\u3001\u9ad8\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u3042\u308b\u30b5\u30a4\u30c8\u306b\u6709\u7528\u306a\u3044\u304f\u3064\u304b\u306e\u8ffd\u52a0\u6a5f\u80fd\u3092\u5099\u3048\u305f\u3001PHP\u306eFastCGI\u5b9f\u88c5\u306e\u4ee3\u66ff\u624b\u6cd5\u3067\u3059\u3002NGINX\u3067PHP\u30da\u30fc\u30b8\u3092\u51e6\u7406\u3059\u308b\u969b\u306b\u306f\u3001PHP-FPM\u304c\u512a\u5148\u3055\u308c\u3001SUPHP\u3084mod_php\u306e\u3088\u3046\u306a\u5f93\u6765\u306eCGI\u30d9\u30fc\u30b9\u306e\u624b\u6cd5\u3088\u308a\u3082\u9ad8\u901f\u3067\u3059\u3002PHP-FPM\u3092\u4f7f\u7528\u3059\u308b\u6700\u5927\u306e\u5229\u70b9\u306f\u3001\u4ed6\u306ePHP\u5b9f\u884c\u65b9\u6cd5\u3068\u6bd4\u3079\u3066\u3001\u304b\u306a\u308a\u5c11\u306a\u3044\u30e1\u30e2\u30ea\u3068CPU\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u305d\u306e\u4e3b\u306a\u7406\u7531\u306f\u3001PHP\u3092\u30c7\u30fc\u30e2\u30f3\u5316\u3057\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306b\u5909\u63db\u3057\u306a\u304c\u3089\u3001PHP\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306eCLI\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<h2>PHP-FPM NGINX\u306e\u8a2d\u5b9a\u6761\u4ef6\u306e\u524d\u63d0\u4e8b\u9805<\/h2>\n<ul class=\"post-ul\">\n<li>You can open a SSH session to your Ubuntu 18.04 system using root or a sudo enabled user.<\/li>\n<li>You have already installed NGINX and PHP in your Ubuntu 18.04 system.<\/li>\n<\/ul>\n<h2>NGINX PHP-FPM\u306e\u8a2d\u5b9a\u624b\u9806<\/h2>\n<ul class=\"post-ul\">\n<li>Install PHP-FPM<\/li>\n<li>Configure PHP-FPM Pool<\/li>\n<li>Configure NGINX for PHP-FPM<\/li>\n<li>Test NGINX PHP-FPM Configuration<\/li>\n<\/ul>\n<h2>1. PHP-FPM\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h2>\n<p>nginx\u306f\u3001\u72ec\u81ea\u306ePHP\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u77e5\u308a\u307e\u305b\u3093\u3002\u305d\u308c\u306fPHP-FPM\u306e\u3088\u3046\u306aPHP\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3001\u52b9\u7387\u7684\u306bPHP\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u4e00\u65b9\u3001PHP-FPM\u306f\u72ec\u81ea\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u4f5c\u6210\u3057\u3066NGINX\u306e\u74b0\u5883\u5916\u3067\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u304cPHP\u30da\u30fc\u30b8\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u3068\u3001nginx\u30b5\u30fc\u30d0\u30fc\u306fFastCGI\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30af\u30a8\u30b9\u30c8\u3092PHP-FPM\u30b5\u30fc\u30d3\u30b9\u306b\u6e21\u3057\u307e\u3059\u3002Ubuntu 18.04\u3067\u306ephp-fpm\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3001PHP\u3068\u305d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u4f9d\u5b58\u3057\u307e\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u306bFPM\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u524d\u306b\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fPHP\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6700\u65b0\u306ePHP 7.3\u304c\u65e2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3068\u4eee\u5b9a\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306eapt-get\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066FPM\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code># apt-get install php7.3-fpm\r\n<\/code><\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001FPM\u30b5\u30fc\u30d3\u30b9\u306f\u81ea\u52d5\u7684\u306b\u958b\u59cb\u3055\u308c\u307e\u3059\u3002\u6b21\u306esystemd\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code># systemctl status php7.3-fpm\r\n\u25cf php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager\r\n   Loaded: loaded (\/lib\/systemd\/system\/php7.3-fpm.service; enabled; vendor preset: enabled)\r\n   Active: active (running) since Sun 2019-02-17 06:29:31 UTC; 30s ago\r\n     Docs: man:php-fpm7.3(8)\r\n Main PID: 32210 (php-fpm7.3)\r\n   Status: \"Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req\/sec\"\r\n    Tasks: 3 (limit: 1152)\r\n   CGroup: \/system.slice\/php7.3-fpm.service\r\n           \u251c\u250032210 php-fpm: master process (\/etc\/php\/7.3\/fpm\/php-fpm.conf)\r\n           \u251c\u250032235 php-fpm: pool www\r\n           \u2514\u250032236 php-fpm: pool www\r\n<\/code><\/pre>\n<h2>2. PHP-FPM\u30d7\u30fc\u30eb\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>php-fpm\u30b5\u30fc\u30d3\u30b9\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d7\u30fc\u30eb\u3092\u4f5c\u6210\u3057\u3001\u305d\u306e\u69cb\u6210\uff08www.conf\uff09\u306f\/etc\/php\/7.3\/fpm\/pool.d\u30d5\u30a9\u30eb\u30c0\u306b\u3042\u308a\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d7\u30fc\u30eb\u306f\u8981\u4ef6\u306b\u5fdc\u3058\u3066\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u5404FPM\u30d7\u30ed\u30bb\u30b9\u306b\u30ea\u30bd\u30fc\u30b9\u5272\u308a\u5f53\u3066\u3092\u3088\u308a\u826f\u304f\u5236\u5fa1\u3059\u308b\u305f\u3081\u306b\u3001\u5225\u3005\u306e\u30d7\u30fc\u30eb\u3092\u4f5c\u6210\u3059\u308b\u306e\u304c\u4e00\u822c\u7684\u306a\u6163\u884c\u3067\u3059\u3002\u3055\u3089\u306b\u3001FPM\u30d7\u30fc\u30eb\u3092\u5206\u96e2\u3059\u308b\u3068\u3001\u72ec\u81ea\u306e\u30de\u30b9\u30bf\u30fc\u30d7\u30ed\u30bb\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u305d\u308c\u305e\u308c\u304c\u72ec\u7acb\u3057\u3066\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u5404PHP\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306fPHP-FPM\u3092\u4f7f\u7528\u3057\u3066\u72ec\u81ea\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u8a2d\u5b9a\u3092\u69cb\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u30021\u3064\u306e\u30d7\u30fc\u30eb\u306e\u69cb\u6210\u3092\u5909\u66f4\u3057\u3066\u3082\u3001\u4ed6\u306eFPM\u30d7\u30fc\u30eb\u3092\u958b\u59cb\u307e\u305f\u306f\u505c\u6b62\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u306e\u3088\u3046\u306a\u30d7\u30fc\u30eb\u3092\u52b9\u679c\u7684\u306b\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u3001\u5225\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u4f7f\u7528\u3057\u3066FPM\u30d7\u30fc\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u307e\u305a\u3001\u3053\u306e\u30d7\u30fc\u30eb\u306b\u72ec\u5360\u7684\u306a\u6a29\u9650\u3092\u6301\u3064\u65b0\u3057\u3044\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code># groupadd wordpress_user\r\n# useradd -g wordpress_user wordpress_user\r\n<\/code><\/pre>\n<p>\u304a\u6c17\u306b\u5165\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\uff08\u4f8b\uff1avi\uff09\u3092\u4f7f\u7528\u3057\u3066\u3001FPM\u306e\u8a2d\u5b9a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code># cd \/etc\/php\/7.3\/fpm\/pool.d\r\n# vi wordpress_pool.conf\r\n[wordpress_site]\r\nuser = wordpress_user\r\ngroup = wordpress_user\r\nlisten = \/var\/run\/php7.2-fpm-wordpress-site.sock\r\nlisten.owner = www-data\r\nlisten.group = www-data\r\nphp_admin_value[disable_functions] = exec,passthru,shell_exec,system\r\nphp_admin_flag[allow_url_fopen] = off\r\n; Choose how the process manager will control the number of child processes. \r\npm = dynamic \r\npm.max_children = 75 \r\npm.start_servers = 10 \r\npm.min_spare_servers = 5 \r\npm.max_spare_servers = 20 \r\npm.process_idle_timeout = 10s\r\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u306eFPM\u306e\u8a2d\u5b9a\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u305d\u306e\u5024\u306f\u4ee5\u4e0b\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>[wordpress_site]: The name of the pool and must be unique across all pool names.<\/li>\n<li>user and group: The user and group under which the pool will run.<\/li>\n<li>listen: The name of the socket file for this pool.<\/li>\n<li>listen.owner and listen.group: Must match to the user and group on which NGINX is running. In our case it is www-data.<\/li>\n<li>php_admin_value: Allows to set custom php configuration values.<\/li>\n<li>php_admin_flag: Allows to set PHP boolean flags.<\/li>\n<li>pm: The process manager settings and the value is Dynamic means the number of child processes are set dynamically based on the following directives.<\/li>\n<li>pm.max_children: The maximum number of children that can be alive at the same time.<\/li>\n<li>pm.start_servers: The number of children created on startup.<\/li>\n<li>pm.min_spare_servers: The minimum number of children in \u2018idle\u2019 state (waiting to process). If the number of idle processes is less than this number then some children will be created.<\/li>\n<li>pm.max_spare_servers: The maximum number of children in idle state (waiting to process). If the number of idle processes is greater than this number then some children will be killed.<\/li>\n<li>pm.process_idle_timeout: The desired maximum number of idle server processes. Used only when pm value is set to dynamic.<br \/>\nApart from above settings, it is also possible to pass few system environmental variable to php-fpm service using something like env[&#8216;PHP_FOO&#8217;] = $bar. For example, adding the following options in the above configuration file will set the hostname and temporary folder location to the PHP environment.<\/li>\n<\/ul>\n<pre class=\"post-pre\"><code>...\r\n...\r\nenv[HOSTNAME] = $HOSTNAME\r\nenv[TMP] = \/tmp\r\n...\r\n...\r\n<\/code><\/pre>\n<p>\u307e\u305f\u3001\u4e0a\u8a18\u306e\u30d7\u30fc\u30eb\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u304a\u3051\u308b\u30d7\u30ed\u30bb\u30b9\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u8a2d\u5b9a\u306f\u52d5\u7684\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u8981\u4ef6\u306b\u6700\u3082\u9069\u3057\u305f\u8a2d\u5b9a\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002\u30d7\u30ed\u30bb\u30b9\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u4ed6\u306e\u8a2d\u5b9a\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\uff1a- \u30b9\u30bf\u30c6\u30a3\u30c3\u30af\uff1a\u4e00\u5b9a\u6570\u306ePHP\u30d7\u30ed\u30bb\u30b9\u304c\u7dad\u6301\u3055\u308c\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>ondemand: No children are created at startup. Children will be forked when new requests are received in the server.<\/li>\n<\/ul>\n<p>\u4e0a\u8a18\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u304c\u7d42\u308f\u3063\u305f\u3089\u3001\u65b0\u3057\u3044\u8a2d\u5b9a\u3092\u9069\u7528\u3059\u308b\u305f\u3081\u306bfpm\u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code># systemctl start php7.3-fpm\r\n<\/code><\/pre>\n<p>FPM\u30d7\u30fc\u30eb\u306f\u3001PHP\u30da\u30fc\u30b8\u3092\u3059\u3050\u306b\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u4e0a\u8a18\u306eFPM\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u3066\u3001\u5225\u3005\u306esystemd\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u4ed6\u306e\u30d7\u30fc\u30eb\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u305a\u306b\u3001\u3053\u306e\u30d7\u30fc\u30eb\u306e\u958b\u59cb\u3068\u505c\u6b62\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>3. PHP-FPM\u7528\u306bNGINX\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/h2>\n<p>\u4ee5\u4e0a\u306eFPM\u30d7\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u3001NGINX\u306e\u30b5\u30fc\u30d0\u30fc\u30d6\u30ed\u30c3\u30af\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u305f\u3081\u306b\u3001NGINX\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3001php\u306elocation\u30d6\u30ed\u30c3\u30af\u5185\u3067\u30d7\u30fc\u30eb\u306e\u30bd\u30b1\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092fastcgi_pass\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>server {\r\n         listen       80;\r\n         server_name  example.scdev.com;\r\n         root         \/var\/www\/html\/wordpress;\r\n\r\n         access_log \/var\/log\/nginx\/example.scdev.com-access.log;\r\n         error_log  \/var\/log\/nginx\/example.scdev.com-error.log error;\r\n         index index.html index.htm index.php;\r\n\r\n         location \/ {\r\n                      try_files $uri $uri\/ \/index.php$is_args$args;\r\n         }\r\n\r\n         location ~ \\.php$ {\r\n            fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\r\n            fastcgi_pass unix:\/var\/run\/php7.2-fpm-wordpress-site.sock;\r\n            fastcgi_index index.php;\r\n            include fastcgi.conf;\r\n    }\r\n}\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/6564898edaa94e2bdf7bb4c0\/26-0.png\" alt=\"NGINX Server Block PHP-FPM\" \/><\/div>\n<p>\u4e0a\u8a18\u306e\u8a2d\u5b9a\u304c\u69cb\u6587\u7684\u306b\u6b63\u3057\u3044\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3001NGINX\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code># nginx-t\r\n# systemctl restart nginx\r\n<\/code><\/pre>\n<h2>4. PHP-FPM NGINX\u8a2d\u5b9a\u306e\u30c6\u30b9\u30c8\u3092\u884c\u3046<\/h2>\n<p>\u4e0a\u8a18\u306eNGINX\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u65b0\u3057\u304f\u4f5c\u6210\u3057\u305fFPM\u30d7\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u30c6\u30b9\u30c8\u3059\u308b\u305f\u3081\u306b\u3001Web\u30eb\u30fc\u30c8\u5185\u306bphp info\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4e0a\u8a18\u306eNGINX\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3001Web\u30eb\u30fc\u30c8\u3068\u3057\u3066\/var\/www\/html\/wordpress\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u3053\u306e\u5024\u3092\u8abf\u6574\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code># cd \/var\/www\/html\/wordpress\r\n# echo \"&lt;?php echo phpinfo();?&gt;\" &gt; info.php\r\n<\/code><\/pre>\n<p>PHP\u60c5\u5831\u30da\u30fc\u30b8\u306e\u4f5c\u6210\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u304a\u6c17\u306b\u5165\u308a\u306e\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u3067\u305d\u308c\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002$_SERVER[&#8216;USER&#8217;]\u3068$_SERVER[&#8216;HOME&#8217;]\u306e\u5024\u304c\u3001\u4ee5\u524d\u306bFPM\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u8a2d\u5b9a\u3057\u305fwordpress_user\u3068\/home\/wordpress_user\u3092\u6307\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001NGINX\u304c\u76ee\u7684\u306eFPM\u30d7\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066PHP\u30da\u30fc\u30b8\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3055\u308c\u307e\u3059\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/6564898edaa94e2bdf7bb4c0\/33-0.png\" alt=\"NGINX PHP-FPM Test Php Info Page\" \/><\/div>\n<h2>\u8981\u7d04<\/h2>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001php-fpm\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u7570\u306a\u308b\u30e6\u30fc\u30b6\u30fc\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u7528\u306b\u5225\u3005\u306e\u30d7\u30fc\u30eb\u3092\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u3092\u5b66\u3073\u307e\u3057\u305f\u3002\u307e\u305f\u3001NGINX\u30b5\u30fc\u30d0\u30fc\u30d6\u30ed\u30c3\u30af\u3092\u8a2d\u5b9a\u3057\u3066PHP-FPM\u30b5\u30fc\u30d3\u30b9\u306b\u63a5\u7d9a\u3059\u308b\u65b9\u6cd5\u3082\u5b66\u3073\u307e\u3057\u305f\u3002PHP-FPM\u306f\u4fe1\u983c\u6027\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3001\u62e1\u5f35\u6027\u3001\u901f\u5ea6\u3092\u63d0\u4f9b\u3057\u3001\u591a\u304f\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306ePHP-FPM\u30d7\u30fc\u30eb\u3092\u8907\u6570\u306e\u30ea\u30bd\u30fc\u30b9\u30d7\u30fc\u30eb\u306b\u5206\u5272\u3059\u308b\u3053\u3068\u3067\u3001\u30b5\u30fc\u30d0\u30fc\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u5411\u4e0a\u3055\u305b\u3001\u30b5\u30fc\u30d0\u30fc\u30ea\u30bd\u30fc\u30b9\u3092\u6700\u9069\u306b\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP-FPM\uff08FastCGI\u30d7\u30ed\u30bb\u30b9\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\uff09\u306f\u3001\u9ad8\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u3042\u308b\u30b5\u30a4\u30c8\u306b\u6709\u7528\u306a\u3044\u304f\u3064\u304b\u306e\u8ffd\u52a0\u6a5f\u80fd\u3092\u5099\u3048\u305f\u3001PHP\u306eFastCGI\u5b9f\u88c5\u306e\u4ee3\u66ff\u624b\u6cd5\u3067\u3059\u3002NGINX\u3067PHP\u30da\u30fc\u30b8\u3092\u51e6\u7406\u3059\u308b\u969b\u306b\u306f\u3001PHP-FPM\u304c\u512a [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,18],"class_list":["post-353","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-26","tag-18"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm\u3092nginx\u3068\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm\u3092nginx\u3068\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-21T01:21:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T13:54:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/6564898edaa94e2bdf7bb4c0\/26-0.png\" \/>\n<meta name=\"author\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"15\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"name\":\"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-03-21T01:21:18+00:00\",\"dateModified\":\"2025-07-31T13:54:40+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\"},\"description\":\"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\",\"name\":\"\u82bd\u4f9d, \u96e8\u591c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"caption\":\"\u82bd\u4f9d, \u96e8\u591c\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5 - Blog - Silicon Cloud","description":"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm\u3092nginx\u3068\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\/","og_locale":"ja_JP","og_type":"article","og_title":"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5","og_description":"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm\u3092nginx\u3068\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-03-21T01:21:18+00:00","article_modified_time":"2025-07-31T13:54:40+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/6564898edaa94e2bdf7bb4c0\/26-0.png"}],"author":"\u82bd\u4f9d, \u96e8\u591c","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u82bd\u4f9d, \u96e8\u591c","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"15\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","name":"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-03-21T01:21:18+00:00","dateModified":"2025-07-31T13:54:40+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27"},"description":"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"PHP-FPM\u3092NGINX\u3068\u8a2d\u5b9a\u306e\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27","name":"\u82bd\u4f9d, \u96e8\u591c","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","caption":"\u82bd\u4f9d, \u96e8\u591c"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/php-fpm%e3%82%92nginx%e3%81%a8%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=353"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/353\/revisions"}],"predecessor-version":[{"id":325786,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/353\/revisions\/325786"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}