[Nginx+php] connect() to unix:/var/run/php-fpm/php-fpm.sock failed (2: No such file or directory)
2020. 8. 14. 16:00ㆍIT/WEB
2020/08/14 10:05:46 [crit] 8538#0: *2 connect() to unix:/var/run/php-fpm/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: [my_IP_address], server: [my_domain], request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "[my_domain]:82"
2020/08/14 10:05:46 [error] 8538#0: *2 open() "/var/www/html/wordpress/nginx-logo.png" failed (2: No such file or directory), client: [my_IP_address], server: [my_domain], request: "GET /nginx-logo.png HTTP/1.1", host: "[my_domain]:82", referrer: "http://[my_domain]:82/"
2020/08/14 10:05:46 [error] 8541#0: *1 open() "/var/www/html/wordpress/poweredby.png" failed (2: No such file or directory), client: [my_IP_address], server: [my_domain], request: "GET /poweredby.png HTTP/1.1", host: "[my_domain]:82", referrer: "http://[my_domain]:82/"
I had to integrate websites that used Nginx and php into other web servers. This content describes the process of resolving errors that occurred during Web server consolidation.
First, I checked the versions of Nginx and php.
Before integrating the web server, I matched the same version of Nginx and php. However, when I checked the php version, php was activating the existing version, and I upgraded the version in a new way.
How to upgrade PHP version:
The same version of Nginx and php were matched, but the same error occurred. So I reinstalled php-fpm. But the result was same.
// Check package name
# yum list php*fpm
// Remove
# yum remove php70w-fpm -y
// Reinstall
# yum install php70w-fpm -y
And I check the path of php-fpm again,
Finally, it was resolved through LISTEN value modification and permission setting.
/etc/php-fpm.d/www.conf
[www]
;user = apache
user = nginx
;group = apache
group = nginx
;listen = 127.0.0.1:9000
listen = /var/run/php-fpm/php-fpm.sock
;listen.owner = nobody
listen.owner = nginx
;listen.group = nobody
listen.group = nginx
listen.mode = 0660
# systemctl restart nginx php-fpm
'IT > WEB' 카테고리의 다른 글
[nginx] proxy 사용 시, index 구문 미 작동. (0) | 2020.11.14 |
---|---|
[httpd] mod_dnssd.so into server: libavahi-common.so.3 (0) | 2020.10.12 |
[Windows] IIS FTP 사용자별 디렉터리 분리(AD 미사용) (0) | 2020.03.02 |
[Windows] IIS URL 재작성 / URL Rewrite Module (0) | 2020.02.04 |
[Windows] IIS 자세한 오류 표시 방법 (0) | 2020.02.04 |