我已经根据本教程( https://wiki.apache.org/httpd/PHP-FPM )或多或少配置了一个网络服务器,但我无法让 PHP 工作。HTML 文件可以正常使用。我收到以下错误消息:
mod_authz_core.c(802): [client <myip>:36570] AH01626: authorization result of Require all denied: denied
mod_authz_core.c(802): [client <myip>:36570] AH01626: authorization result of <RequireAny>: denied
127.0.0.1 [client <myip>:36570] AH01630: client denied by server configuration: proxy:fcgi://127.0.0.1:9000/var/www/html/test.php
Run Code Online (Sandbox Code Playgroud)
这是我的 PHP 文件:
www@<server>:/var/www/html$ ls -l
-rw-rw---- 1 www www-data 26 Sep 6 09:14 test.php
Run Code Online (Sandbox Code Playgroud)
如您所见,该文件属于“www”。网络服务器和“php-fpm”作为“www-data”运行。
这是“apache.conf”的基本配置:
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride None
Require all …
Run Code Online (Sandbox Code Playgroud)