How to make PHP FPM with nginx faster

I wanted to tune my webserver a bit to make PHP FPM and nginx faster.

First i upgraded the Debian server to Buster (newest Version 10). Here you can install php7.3-fpm instead of the old php7.0-fpm.

In the file /etc/php/7.3/fpm/pool.d/www.conf the connection was configured over a tcp socket, which i have disabled (;listen = 127.0.0.1:9000).

Instead i have used a filesystem socket (listen = /run/php/php7.3-fpm.sock). This makes it a lot faster because of the tcp overhead (even when it’s running locally).

In my upstream nginx config (/etc/nginx/upstream.conf) i have changed the tcp socket to the filesystem socket (fastcgi_pass unix:/run/php/php7.3-fpm.sock;).

The caching config for nginx still exists (/etc/nginx/caching.conf).

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Nach oben scrollen