Back to Developer Roadmap

Nginx

src/data/roadmaps/php/content/nginx@aspZpACHEKOsi_Er5FYPY.md

4.0898 B
Original Source

Nginx

Nginx is often deployed as a reverse proxy server for PHP applications, helping to manage client requests and load balance. Unlike traditional servers, Nginx handles numerous simultaneous connections more efficiently, proving instrumental in delivering PHP content faster. For PHP, one common configuration with Nginx involves PHP-FPM (FastCGI Process Manager). FastCGI is a variation on the earlier CGI (Common Gateway Interface), it allows for long-lived PHP processes that can service many requests, improving the performance of PHP applications. For instance, your Nginx server configuration for serving PHP files might include directives like these:

location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}

Visit the following resources to learn more: