I have an aws server that runs some php code.
I recently upgraded to php8. Now when I access php pages on my site (for example https://whitewaterwriters.com/oracle/index.php) I get a nginx error.
I look at the logs with sudo tail /var/log/nginx/error.log
and I get this:
2022/11/22 10:43:23 [crit] 2309#2309: *12122 connect() to unix:/run/php-fpm/www.sock failed (2: No such file or directory) while connecting to upstream, client: 51.148.131.133, server: whitewaterwriters.com, request: "GET /oracle/index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "whitewaterwriters.com"
So it's looking for a socket at www.sock. There isn't such a socket (although I do have that socket on a different server that I'd swear I configured the same way) The socket I have is php-frm.sock. That's the socket that the nginx.conf file refers to:
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
and the one that php.ini listens on (at /etc/php-fpm.d/www.conf)
listen = /var/run/php-fpm/php-fpm.sock
My question is: what is the config file that is telling nginx to look for a www.sock? Or how do I create that socket?