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 > System' 카테고리의 다른 글
[MariaDB] DB 이관하기 | mariadb 백업, 복원 (0) | 2020.08.20 |
---|---|
[CMD] 활성 코드 페이지 영구 변경하기 (0) | 2020.08.19 |
[php] How to Upgrade PHP 5.4 to PHP 7.0 on CentOS 7.8 (0) | 2020.08.14 |
[MSSQL] DB별 계정 및 역할(Role) 조회 (0) | 2020.08.14 |
[Windows] 'Windows\Temp' directory is full of cab_xxxxx files (0) | 2020.08.12 |