linux+php+apache+mysql(mariadb)故障排除

wordpress 网页文件打不开(client denied by server)、白屏(http 500)问题排除顺序

1.查看apache错误日志查照问题报告找到问题 “client denied by server”。


2.client denied by server是权限问题

设置httpd.conf或者虚拟主机vhost的.conf中的权限相关为。
RewriteEngine on
AllowOverride FileInfo或All
Require all granted等


3.解决权限问题后仍然页面白屏无显示,继续查看apache错误日志。没有新错误日志,查看通过日志显示http 500服务器内部错误。

之前有过相关情况但是有错误提示并且显示为open_basedir或者"Fatal error: require_once(): Failed opening required '/xxx/xxx/includes/xx.php' (include_path='.:/usr/share/pear:/usr/share/php')"

于是配置php.ini

找到open_basedir或include_path(php.ini中分unix与windows两个配置选项)把提示中的路径加入到后面用冒号 : 分割。(示例 include_path = ".:/php/includes:/home/web/"     open_basedir = .:/tmp/:/home/web/ )

ps:以下内容来自网络,未找到出处。如果有人知道请留言。我加上

open_basedir可将用户访问文件的活动范围限制在指定的区域,通常是其家目录的路径,也可用符号"."来代表当前目录。注意用open_basedir指定的限制实际上是前缀,而不是目录名。

举例来说: 若"open_basedir = /dir/user", 那么目录 "/dir/user" 和 "/dir/other"都是可以访问的。所以如果要将访问限制在仅为指定的目录,请用斜线结束路径名。
open_basedir也可以同时设置多个目录,在Windows中用分号分隔目录,在任何其它系统中用冒号分隔目录。当其作用于Apache模块时,父目录中的open_basedir路径自动被继承。

原文地址:https://www.cnblogs.com/eastegg/p/5545941.html