【发布时间】:2017-04-23 12:32:31
【问题描述】:
我通过 yii2 在 localhost 中使用 xampp 创建了我的网站,它可以毫无问题地运行。
但现在 上传 我的网站在 linux 主机上后,我收到以下错误:
Forbidden
You don't have permission to access /index.php on this server.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
这是我的 htaccess 内容:
RewriteEngine on
# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
为什么会出现这个错误?
【问题讨论】:
-
更改你的app/web服务器目录的权限
-
@scaisEdge 请解释更多
-
检查用户对您目录的权限查看此以获得简要说明linuxcommand.org/lts0070.php
-
@scaisEdge 我无权访问 shell 来编写这样的命令。
-
我的所有文件有644权限
标签: php linux .htaccess web-services cpanel