【问题标题】:client denied by server configuration:客户端被服务器配置拒绝:
【发布时间】:2022-01-22 18:35:28
【问题描述】:

在浏览器中输入网站 url 会下载一个空的记事本文件,大小为 0 kb。网站自动停止并自动启动。我很困惑这怎么可能。谁能帮帮我。

Error :client denied by server configuration: /home/ki687495/public_html/vendor/laravel/.env



    <IfModule mod_rewrite.c>
        <IfModule mod_negotiation.c>
            Options -MultiViews -Indexes
        </IfModule>
    
        <Files .env>
            Order Allow,Deny
            Deny from all
        </Files>
    
        RewriteEngine On
    
        # Handle Authorization Header
        RewriteCond %{HTTP:Authorization} .
        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        # Redirect Trailing Slashes If Not A Folder...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_URI} (.+)/$
        RewriteRule ^ %1 [L,R=301]
    
        # Handle Front Controller...
        RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.jpeg|\.gif|robots\.txt|\.ico|\.woff|\.woff2|.ttf|\.svg)$ [NC]
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]
    
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_URI} !^/public/
        RewriteRule ^(css|assets|landing|storage|installer|js)/(.*)$ public/$1/$2 [L,NC]
    </IfModule>
    
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php73” package as the default “PHP” programming language.
    <IfModule mime_module>
      AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit


【问题讨论】:

  • 听起来您的服务器端逻辑无法访问该环境数据。结果似乎是一个无效的响应,它被您的客户端系统错过了解释,不管是什么。

标签: php apache laravel-5 virtualhost


【解决方案1】:

客户端被服务器配置拒绝,如果 php 版本错误,请检查文档以获取正确版本以及配置是否不正确。

【讨论】:

    猜你喜欢
    • 2012-01-14
    • 2019-12-10
    • 2012-05-08
    • 1970-01-01
    • 2013-08-25
    • 2011-04-10
    • 2020-04-25
    相关资源
    最近更新 更多