Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
33
rated 0 times [  33] [ 0]  / answers: 1 / hits: 43383  / 1 Year ago, thu, january 26, 2023, 10:38:57

I have Ubuntu 11.10 and installed php5-fpm and I want to configure nginx. I want to use unix sockets instead of tcp sockets but I couldn't find the



 /var/run/php5-fpm.sock


I have looked also



/tmp/php5-fpm.sock


Where is php5-fpm.sock file? I also tried



locate php5-fpm.sock


but I couldn't find anything.
Note: php5-fpm is working . I have started as a service
http://blog.bigdinosaur.org/wordpress-on-nginx/
http://blog.nas-admin.org/?p=25


More From » php

 Answers
7

In the default configuration before 12.10 Quantal, PHP FPM is set to listen on TCP port 9000 on address 127.0.0.1. This can be changed in /etc/php5/fpm/pool.d/www.conf.



Look for the line:



listen = 127.0.0.1:9000


and change it to something like:



listen = /var/run/php5-fpm.sock


After doing so, restart PHP FPM:



sudo /etc/init.d/php5-fpm restart


(note: reload is broken on Oneiric as it sends a HUP signal to php5-fpm which is wrong. It's fixed in Precise by sending USR2, bugreport).



Note: as mentioned by @SpamapS (palingdrome :D), newer releases use Unix sockets by default, not the tcp socket. See this Launchpad comment, it got changed in 12.10 Quantal.


[#39786] Friday, January 27, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ofunn

Total Points: 164
Total Questions: 116
Total Answers: 116

Location: Liberia
Member since Fri, Oct 22, 2021
3 Years ago
;