【问题标题】:Laravel Godday apache hosting is saying You don't have permission to access /laravel/ on this serverLaravel Godday apache 托管说您无权访问此服务器上的 /laravel/
【发布时间】:2016-02-04 07:31:35
【问题描述】:

我正在使用托管,并希望在此托管上运行 Laravel 5.1 项目,但是当我打开 laravel 文件夹时使用 我的 PHP 版本是 5.5

http://pndhub.com/laravelss/

然后它告诉我这个

Forbidden

You don't have permission to access /laravel/ on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

但相同的代码在我的另一个托管帐户服务器上也可以使用 这是我的 .htaccess 代码

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

如果我点击 cpanel 上的错误,则会显示此错误

[autoindex:error] AH01276: Cannot serve directory /home/myhosting/public_html/laravel/: No matching DirectoryIndex (index.html.var,index.htm,index.html,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.php,index.phtml,index.shtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html,welcome.html) found, and server-generated directory index forbidden by Options directive

【问题讨论】:

    标签: php apache .htaccess laravel http-status-code-403


    【解决方案1】:

    虚拟主机的目录必须是

    /home/myhosting/public_html/laravel/public
    

    【讨论】:

    • 感谢您的回复,能否告诉我在我的 cpanel 中哪里可以找到虚拟主机
    • 我认为 cpanel 没有。您必须具有 ssh 访问权限或 whm 访问权限。 forums.cpanel.net/threads/change-document-root.84317。我想你必须联系支持中心pndhub.com/laravelss/public 工作正常
    • 什么是 ssh 访问我如何才能知道它是一个共享主机我无法获得 whm 访问权限
    猜你喜欢
    • 2013-08-18
    • 1970-01-01
    • 2015-10-07
    • 2017-05-14
    • 1970-01-01
    • 2018-05-17
    • 2020-09-10
    • 2014-02-25
    • 2014-05-24
    相关资源
    最近更新 更多