webmin/virtualmin出现500错误的解决办法,部分网站正常,部分出500错误
  • 今天遇到个奇怪的现象,webmin/virtualmin部分网站正常,部分出500错误。重启了apache也没有用,html等静态页访问正常,php页面都不正常。出现500错误的现象:

     Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

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

    分析:

    看web日志(/var/log/virtualmin/654z.com_error.log)发现错误:

    [Sat Oct 09 16:10:08 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
    [Sat Oct 09 16:10:08 2010] [error] [client 113.91.34.5] Premature end of script headers: index.php,

    google一把不得其解。在看suexe日志(tail -f /var/log/httpd/suexec.log):

    [2010-10-09 16:17:33]: directory is writable by others: (/home/www.654z.com/fcgi-bin)

    原因就在这里了,directory is writable by others

    解决办法:

    执行命令 chmod 755 -R /home/www.654z.com/fcgi-bin

    刷新网页,发现不在500错误了。如果还有500错误,请在上层目录(/home/www.654z.com) chmod -R 755 .

    原来是目录权限问题,搞定,收工。

     

  •  

  • 点这里复制本页地址发送给您QQ/MSN上的好友
  • 300*300广告