Centos上的Nginx 静态文件可以很好地服务。 尝试安装phpBB论坛,这是我从error.log中得到的
2019/05/10 18:21:38 [crit] 21218#21218: *369252 connect() to
unix:/var/run/php-fpm/php-fpm.sock failed (13: Permission denied)
while connecting to upstream, client: 127.0.0.1, server:
example.com, request: "GET /phpBB3/ HTTP/1.1", upstream:
"fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "example.com"
我的nginx conf是:
server {
listen *:80;
server_name example.com;
error_log /var/log/nginx/test.error.log;
access_log /var/log/nginx/test-access.log;
root /var/www/testdomain;
index index.php index.html;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
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;
}
}
SELinux已关闭
我的错误在哪里?
我读过类似的问题,但找不到CentOS的确切答案