【问题标题】:File does not exist: sys_cpanel php文件不存在:sys_cpanel php
【发布时间】:2012-06-07 07:44:09
【问题描述】:

我正在尝试在 VPS(虚拟专用服务器)上设置我的网站。当我浏览像abc.html 这样的静态文件时,它运行良好。但是,当我尝试浏览具有数据库连接的文件时,出现 500 错误:The request was not completed. The server met an unexpected condition.

所以我认为我的 mysql 凭据是错误的。但他们似乎是正确的。当我进入 CPanel 并检查日志时,我发现:

[Sat Jun 02 08:19:26 2012] [error] [client XXX.XXX.XXX.XXX] 文件不存在:/home/abv/public_html/abv/Connections/sys_cpanel,引用者:http://XXX.XXX.XXX.XXX/~abv/abv/Connections/PowerCMSConnection.php

谷歌搜索表明我的 .htaccess 文件有问题。但如果它是错误的,那么为什么不使用数据库连接的文件可以工作?

无论如何,这是我的 .htaccess 文件:

##########################################

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\$ $1.html [nc]

Redirect 301 /business.html http://www.something.com/corporate-production-video
Redirect 301 /events.html http://www.something.com/london-videography
Redirect 301 /property.html http://www.something.com/property-on-video
Redirect 301 /weddings.html http://www.something.com/weddings-videographer
Redirect 301 /contact_us.html http://www.something.com/production-companies-music-video

有人可以建议错误可能是什么吗?

【问题讨论】:

  • 检查 WHM 中的 mod_userdir 调整。
  • @Tar:我看到 DefaultHost (nobody) 复选框已勾选 XXX.com (XXX) 复选框未勾选。我该怎么办?
  • 尝试将RewriteRule ^(.*)\$ $1.html [nc]更改为RewriteRule ^(.*)$ $1.html [nc]
  • 其实我发现了问题。服务器需要文件的权限为 644,文件夹的权限为 755。我的文件和文件夹都带有 755 的 chmod,这导致了问题。无论如何,谢谢。

标签: php mysql hosting cpanel vps


【解决方案1】:

如果您的浏览器支持 Private Browsing(Fifefox,Incognito 用于 Google Chrome,InPrivate 用于 Internet Explorer),请在初始化后尝试打开站点这样的隐私浏览模式。

不久前,当我为重定向配置我的网络服务器时,结果发现浏览器保存了第一个重定向设置(301 表示 永久 重定向),即使我更改了配置并重新启动了服务器,我的浏览器使用的是相同的、坏的、本地缓存的数据。检查隐私浏览模式后,我的问题已解决。

【讨论】:

    猜你喜欢
    • 2015-12-15
    • 2015-06-27
    • 1970-01-01
    • 2011-03-15
    • 2011-11-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-24
    • 2013-01-07
    相关资源
    最近更新 更多