VOOZH about

URL: https://www.digitalocean.com/community/tutorials/php-fpm-nginx?comment=187359

⇱ How to Configure PHP-FPM with NGINX | DigitalOcean


How to Configure PHP-FPM with NGINX

Updated on June 18, 2026

By Anish Singh Walia

Sr Technical Content Strategist and Team Lead

πŸ‘ How to Configure PHP-FPM with NGINX

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the author

πŸ‘ Anish Singh Walia
Anish Singh Walia
Author
Sr Technical Content Strategist and Team Lead
See author profile

I help Businesses scale with AI x SEO x (authentic) Content that revives traffic and keeps leads flowing | 3,000,000+ Average monthly readers on Medium | Sr Technical Writer(Team Lead) @ DigitalOcean | Ex-Cloud Consultant @ AMEX | Ex-Site Reliability Engineer(DevOps)@Nutanix

Still looking for an answer?

Was this helpful?

Thank you for your tutorial. I am plan to install Nginx server separately with PHP server. Meaning Nginx in one server and PHP is in another server…And the NGINX server will located at DMZ zone and will face the internet. My question is: 1) Which server we need to install PHP-FPM? In Nginx server or in php server? 2) And how these two server will communicate? Which confuguration files need to alter? Sorry if my question is sound silly :). I am new to php-fpm and still in the midst of understanding it. Thank you.

- Paklah

when ever i m trying to execute php file from browser it gets download

- aditya

I have deployed a web app to AWS and php-fpm is occupied most of the CPU cores. sometimes it makes the server crash. Can there be something wrong with the configuration?

- vishal

Please add - if necessary: $ cd /project/path $ sudo chwon -R wordpress_user:wordpress_user . Because without that PHP-FPM can’t access to the files ;/

- Piotr

πŸ‘ Creative Commons
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
  • Deploy on DigitalOcean

    Click below to sign up for DigitalOcean's virtual machines, Databases, and AIML products.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and AI-native businesses

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow β€” whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Β© 2026 DigitalOcean, LLC.Sitemap.
Dark mode is coming soon.