{"id":43035,"date":"2022-12-05T12:30:02","date_gmt":"2022-12-05T18:30:02","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=43035"},"modified":"2022-12-28T04:40:17","modified_gmt":"2022-12-28T10:40:17","slug":"configure-php-fpm-with-nginx-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/","title":{"rendered":"Configure PHP-FPM with Nginx on Ubuntu 22.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-43649\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/11\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp\" alt=\"configure php-fpm with nginx on ubuntu 22.04\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/11\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/11\/configure-php-fpm-with-nginx-on-ubuntu-22-04-300x150.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/11\/configure-php-fpm-with-nginx-on-ubuntu-22-04-150x75.webp 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>In this tutorial, we are going to explain how to configure PHP-fpm with Nginx on Ubuntu 22.04.<\/p>\n<p><a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-fix-common-nginx-web-server-errors\/\">Nginx is a web server<\/a> used for serving web requests on our website. It can be used as a reverse proxy, mail proxy, HTTP cache, or load balancer. Nginx is a free and open source software that can be configured with the PHP module PHP-fpm and improve the website loading and handle a huge amount of traffic in no time.<\/p>\n<p>Configuring PHP-fpm with Nginx on Ubuntu 22.04 is a very easy and straightforward process that can take up to 15 minutes. Let&#8217;s get started!<\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69cef3db1a23c\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69cef3db1a23c\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#Step-1-Update-the-System\" >Step 1. Update the System<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#Step-2-Install-Nginx-webserver\" >Step 2. Install Nginx webserver<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#Step-3-Install-PHP-FPM\" >Step 3. Install PHP-FPM<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#Step-4-Configure-PHP-FPM-with-Nginx\" >Step 4. Configure PHP-FPM with Nginx<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>Fresh install of Ubuntu 22.04<\/li>\n<li>User privileges: root or non-root user with sudo privileges<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Step-1-Update-the-System\"><\/span>Step 1. Update the System<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A fresh installation of Ubuntu 22.04 needs a system update, and that&#8217;s why we need to execute the following commands.<\/p>\n<pre>sudo apt update -y &amp;&amp; sudo apt upgrade -y<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-2-Install-Nginx-webserver\"><\/span>Step 2. Install Nginx webserver<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The Nginx web server can be installed with the following command:<\/p>\n<pre>sudo apt install nginx -y<\/pre>\n<p>Once the installation is complete, start and enable the Nginx service:<\/p>\n<pre>sudo systemctl start nginx &amp;&amp; sudo systemctl enable nginx<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-3-Install-PHP-FPM\"><\/span>Step 3. Install PHP-FPM<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Next is to install the php-fpm php extension along with other php extensions.<\/p>\n<pre>sudo apt install software-properties-common ca-certificates lsb-release apt-transport-https -y\r\n\r\nLC_ALL=C.UTF-8 add-apt-repository ppa:ondrej\/php\r\n\r\nsudo apt update<\/pre>\n<p>Once the dependencies are installed, we are ready to install the PHP-FPM.<\/p>\n<pre>sudo apt install php8.1 php8.1-fpm php8.1-mysql php8.1-mbstring php8.1-xml php8.1-curl<\/pre>\n<p>Once installed, start and enable the <b>php8.1-fpm.service<\/b><\/p>\n<pre>sudo systemctl start php8.1-fpm.service &amp;&amp; sudo systemctl enable php8.1-fpm.service<\/pre>\n<p>To check if everything is OK, execute the following command:<\/p>\n<pre>sudo systemctl status php8.1-fpm.service<\/pre>\n<p>You should receive the following output:<\/p>\n<pre>root@host:\/var\/www\/html# systemctl status php8.1-fpm\r\n\u25cf php8.1-fpm.service - The PHP 8.1 FastCGI Process Manager\r\n     Loaded: loaded (\/lib\/systemd\/system\/php8.1-fpm.service; enabled; vendor preset: enabled)\r\n     Active: active (running) since Sat 2022-09-10 15:31:29 CEST; 1min 52s ago\r\n       Docs: man:php-fpm8.1(8)\r\n   Main PID: 16869 (php-fpm8.1)\r\n     Status: \"Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req\/sec\"\r\n      Tasks: 3 (limit: 4575)\r\n     Memory: 8.9M\r\n        CPU: 482ms\r\n     CGroup: \/system.slice\/php8.1-fpm.service\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-4-Configure-PHP-FPM-with-Nginx\"><\/span>Step 4. Configure PHP-FPM with Nginx<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>This is the last and the most important step since, in this paragraph, we are going to explain how to configure the PHP-fpm with previously installed Nginx.<\/p>\n<p>We need to create a virtual host file containing our domain name. Go into the Nginx configuration directory and create the file.<\/p>\n<pre>cd \/etc\/nginx\/conf.d\/ &amp;&amp; sudo nano yourdomain.com.conf<\/pre>\n<p>Paste the following lines of code.<\/p>\n<pre>server {\r\n            listen       80;\r\n         server_name  yourdomain.com;\r\n         root         \/var\/www\/html\/;\r\n\r\n         access_log \/var\/log\/nginx\/yourdomain.com-access.log;\r\n         error_log  \/var\/log\/nginx\/yourdomain.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\/php\/php8.1-fpm.sock;\r\n            fastcgi_index index.php;\r\n            include fastcgi.conf;\r\n    }\r\n        }\r\n}<\/pre>\n<p>Check the Nginx configuration syntax to see if it is OK.<\/p>\n<pre>nginx -t<\/pre>\n<p>You should receive the following output:<\/p>\n<pre>root@vps:\/etc\/nginx\/conf.d# nginx -t\r\nnginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful\r\n<\/pre>\n<p>Restart the Nginx service.<\/p>\n<pre>sudo systemctl restart nginx<\/pre>\n<p>Next is to create a custom pool in the configuration of the PHP8.1-FPM. The location of the pool configuration is <b> \/etc\/php\/8.1\/fpm\/pool.d<\/b> The default pool configuration is <b>www.conf<\/b>, but we will not make changes to this file since it is recommended to use separate files for every new configuration and website.<\/p>\n<p>First, we need to create a group and user, then add the user to the group<\/p>\n<pre>groupadd php_fpm_group\r\n\r\nuseradd -g php_fpm_group php_fpm_user<\/pre>\n<p>Next, we need to create a pool configuration for the website.<\/p>\n<pre>cd \/etc\/php\/8.1\/fpm\/pool.d &amp;&amp;  touch yourdomain.conf<\/pre>\n<p>Open the file <b>yourdomain.conf<\/b> with your favorite editor and paste the following lines of code:<\/p>\n<pre>[pool_name]\r\nuser = php_fpm_user\r\ngroup = php_fpm_group\r\nlisten = \/var\/run\/php\/php8.1-fpm.sock\r\nlisten.owner = www-data\r\nlisten.group = www-data \r\npm = dynamic \r\npm.max_children = 30 \r\npm.start_servers = 5  \r\npm.process_idle_timeout = 20s\r\n<\/pre>\n<p>Let&#8217;s explain the parameters in the file created above:<\/p>\n<p>The pool name must be specific to every new pool configuration. The <b>user<\/b> and <b>group<\/b> must be the created user and group for our website, while the <b>listen.owner<\/b> and <b>listen.group<\/b> is the user and the group that Nginx is running on. The <b>listen<\/b> is the path of the PHP8.1 sock.<\/p>\n<p>The <b>pm.max_children<\/b> is for setting the maximum number of children that can be alive at the same time. The <b>pm.start_servers<\/b> is the number of children created on startup. The <b>pm.process_idle_timeout<\/b> is used only if the <b>pm<\/b> is set to dynamic and is the number of desired maximum number idle server processes. The <b>pm=dynamic<\/b> means the number of child processes is set dynamically based on the following directives.<\/p>\n<p>Remember that this configuration can be different according to your server resource and website needs.<\/p>\n<p>The last thing is to create the <b>phpinfo.php<\/b> file into the document root of your website.<\/p>\n<pre>cd \/var\/www\/html\/ &amp;&amp; sudo nano phpinfo.php<\/pre>\n<p>Once you open the file, paste the following lines of code:<\/p>\n<pre>&lt;? php\r\nphpinfo();\r\n?&gt;\r\n<\/pre>\n<p>Save the file, close it and access the following URL: <b>http:\/\/yourdomain.com\/phpinfo.php<\/b><\/p>\n<p>In the <b>Environment<\/b> and <b>PHP Variables<\/b> you can notice that the <b>USER<\/b> and <b>HOME<\/b> are set to <b>php_fpm_user<\/b> and <b>\/home\/php_fpm_user<\/b>, respectively. This is proof that the PHP-FPM is successfully configured with Nginx.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43036\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/09\/php1.jpg\" alt=\"\" width=\"936\" height=\"255\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/09\/php1.jpg 936w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/09\/php1-300x82.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/09\/php1-150x41.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/09\/php1-768x209.jpg 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/p>\n<p>That&#8217;s it. If you find any difficulties while configuring this, you can simply contact our technical support by submitting a support ticket, and our admins will help you immediately. We are available 24\/7.<\/p>\n<p>If you liked this about configuring PHP-fpm with Nginx on <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting\/\">Ubuntu 22.04<\/a>, please share it with your friends on social networks or simply leave a reply below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we are going to explain how to configure PHP-fpm with Nginx on Ubuntu 22.04. Nginx is a &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Configure PHP-FPM with Nginx on Ubuntu 22.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#more-43035\" aria-label=\"Read more about Configure PHP-FPM with Nginx on Ubuntu 22.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":43649,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1707],"tags":[49,51,2012],"class_list":["post-43035","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-web-servers","tag-nginx","tag-php-fpm","tag-ubuntu-22-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Configure PHP-FPM with Nginx on Ubuntu 22.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"In this tutorial, we are going to explain how to configure PHP-fpm with Nginx on Ubuntu 22.04. Let&#039;s get started!\" \/>\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.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Configure PHP-FPM with Nginx on Ubuntu 22.04\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we are going to explain how to configure PHP-fpm with Nginx on Ubuntu 22.04. Let&#039;s get started!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-05T18:30:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-28T10:40:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/11\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Configure PHP-FPM with Nginx on Ubuntu 22.04\" \/>\n<meta name=\"twitter:description\" content=\"In this tutorial, we are going to explain how to configure PHP-fpm with Nginx on Ubuntu 22.04. Let&#039;s get started!\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Configure PHP-FPM with Nginx on Ubuntu 22.04\",\"datePublished\":\"2022-12-05T18:30:02+00:00\",\"dateModified\":\"2022-12-28T10:40:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/\"},\"wordCount\":693,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp\",\"keywords\":[\"nginx\",\"php-fpm\",\"ubuntu 22.04\"],\"articleSection\":[\"Tutorials\",\"Web Servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/\",\"name\":\"Configure PHP-FPM with Nginx on Ubuntu 22.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp\",\"datePublished\":\"2022-12-05T18:30:02+00:00\",\"dateModified\":\"2022-12-28T10:40:17+00:00\",\"description\":\"In this tutorial, we are going to explain how to configure PHP-fpm with Nginx on Ubuntu 22.04. Let's get started!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp\",\"width\":742,\"height\":372,\"caption\":\"configure php-fpm with nginx on ubuntu 22.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/configure-php-fpm-with-nginx-on-ubuntu-22-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configure PHP-FPM with Nginx on Ubuntu 22.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Configure PHP-FPM with Nginx on Ubuntu 22.04 | RoseHosting","description":"In this tutorial, we are going to explain how to configure PHP-fpm with Nginx on Ubuntu 22.04. Let's get started!","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.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/","og_locale":"en_US","og_type":"article","og_title":"Configure PHP-FPM with Nginx on Ubuntu 22.04","og_description":"In this tutorial, we are going to explain how to configure PHP-fpm with Nginx on Ubuntu 22.04. Let's get started!","og_url":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2022-12-05T18:30:02+00:00","article_modified_time":"2022-12-28T10:40:17+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/11\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp","type":"image\/webp"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_title":"Configure PHP-FPM with Nginx on Ubuntu 22.04","twitter_description":"In this tutorial, we are going to explain how to configure PHP-fpm with Nginx on Ubuntu 22.04. Let's get started!","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Configure PHP-FPM with Nginx on Ubuntu 22.04","datePublished":"2022-12-05T18:30:02+00:00","dateModified":"2022-12-28T10:40:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/"},"wordCount":693,"commentCount":1,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/11\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp","keywords":["nginx","php-fpm","ubuntu 22.04"],"articleSection":["Tutorials","Web Servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/","url":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/","name":"Configure PHP-FPM with Nginx on Ubuntu 22.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/11\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp","datePublished":"2022-12-05T18:30:02+00:00","dateModified":"2022-12-28T10:40:17+00:00","description":"In this tutorial, we are going to explain how to configure PHP-fpm with Nginx on Ubuntu 22.04. Let's get started!","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/11\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/11\/configure-php-fpm-with-nginx-on-ubuntu-22-04.webp","width":742,"height":372,"caption":"configure php-fpm with nginx on ubuntu 22.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/configure-php-fpm-with-nginx-on-ubuntu-22-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Configure PHP-FPM with Nginx on Ubuntu 22.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/43035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=43035"}],"version-history":[{"count":17,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/43035\/revisions"}],"predecessor-version":[{"id":43738,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/43035\/revisions\/43738"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/43649"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=43035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=43035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=43035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}