PHP-FPM (NGINX): Switch from IP-based routing to socket-based routing

2 posts / 0 new
Last post
#1 Mon, 05/14/2018 - 01:13
MB-Jan

PHP-FPM (NGINX): Switch from IP-based routing to socket-based routing

Hi there,

Here are the server specifications:

  • Operating system: CentOS Linux 7.4.1708
  • Webmin version: 1.881
  • Usermin version: 1.741
  • Virtualmin version: 6.03
  • Theme version: Authentic Theme 19.09.2
  • Kernel and CPU: Linux 3.10.0-693.21.1.el7.x86_64 on x86_64
  • Processor information: Virtual CPU 82d9ed4018dd, 4 cores
  • System uptime: 4 days, 21 hours, 49 minutes
  • Running processes: 337
  • CPU load averages: 0.00 (1 min) 0.04 (5 mins) 0.05 (15 mins)
  • Real memory: 5.60 GB used / 7.46 GB total
  • Virtual memory: 27.59 MB used / 3.91 GB total
  • Local disk space: 23.64 GB used / 74.80 GB free / 98.43 GB total

Customizations I made so far:

  • I installed NGINX
  • I installed PHP 7.2
  • I update MariaDB to 10.2
  • I installed REDIS and configured it to save PHP sessions
  • I configured 4GB swap space with a swappiness of 30

Question:
Under the NGINX settings I see that "Connect Nginx to PHP processes with" is set to "Socket Files". However, all servers that use PHP-FPM use IP based routing in their NGINX config, e.g. localhost:8000. It works great, but I read that it is slightly slower than socket based routing, so I am wondering if it is possible to change it?

Mon, 05/21/2018 - 23:16
dowell22

Yes, but I don't think there's a UI fix for that. You may do it manually though.

Topic locked