Internal Server Error 错误 The server encountered an internal error or misconfiguration and was una......

日期:2018年12月26日

问题:
服务器url rewrite开启,后文章访问出现Internal Server Error错误。
错误提示:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

解决:

  1. 检查 apache错误日志 sudo tail /var/log/httpd/error.log
    如下
    [Wed Dec 26 15:48:03.478521 2018] [core:error] [pid 23754] [client 210.72.20.5:53971] AH00124: Request exceeded the limit of 10 internal redi
    rects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://47.XXXXXX.XX/wordpress/1/

修改.htaccess 为以下内容,

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$ 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

2 继续来坑:提示错误Not Found
The requested URL /index.php was not found on this server.
检查 apache错误日志 sudo tail /var/log/httpd/error.log
如下
[php7:error] [pid 30837] [client 210.72.20.5:58994] script '/var/www/html/index.php' not found or unable to stat, referer: http://47.254.91.50/wordpress/1/

httpd.conf文件中 指向 "/var/www/html/wordpress"文件夹及index.html index.php文件

DocumentRoot "/var/www/html/wordpress"

<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

3 重启

4 来坑:

 该网页无法正常运作
XXXXX 将您重定向的次数过多。
[尝试清除 Cookie]
ERR_TOO_MANY_REDIRECTS

(ˉ▽ˉ;)...无解

5 用了测试服务器的.htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress

和/etc/httpd/conf/httpd.conf。

<Directory />
    AllowOverride none
    Require all denied
</Directory>
……
DocumentRoot "/var/www/html"
……
<Directory "/var/www">
    AllowOverride none
    # Allow open access:
    Require all granted
</Directory>
……
<Directory "/var/www/html">
AllowOverride All
</Directory>

没重启服务器 ,依旧报错。

日期:
2019年1月2日 节后回来自己恢复了。
(ˉ▽ˉ;)...无解

mark解决方法:
wordpress登录页cookies被阻止导致反复重定向登录页进不了后台

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值