美文网首页
Internal Server Error 错误 The ser

Internal Server Error 错误 The ser

作者: Tanya木易 | 来源:发表于2018-12-26 17:27 被阅读0次

    日期: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被阻止导致反复重定向登录页进不了后台

    相关文章

      网友评论

          本文标题:Internal Server Error 错误 The ser

          本文链接:https://www.haomeiwen.com/subject/hywhlqtx.html