【问题标题】:Piwik not showing the imagesPiwik 不显示图像
【发布时间】:2017-06-19 10:26:19
【问题描述】:

我在 RHEL 7 服务器上安装/配置了 Piwik(使用 Apache 2.4 和 PHP 7.0),但图像未显示。

网址 f.ex.徽标是http://localhost/plugins/Morpheus/images/logo.svg 或“http://.../plugins/Morpheus/images/logo.png”。当我将直接打开 url 时,我收到此错误:

内部服务器错误

服务器遇到内部错误或配置错误,无法完成您的请求。

请通过 (mail) 联系服务器管理员,告知他们此错误发生的时间,以及您在此错误之前执行的操作。

服务器错误日志中可能会提供有关此错误的更多信息。

此外,在尝试使用 ErrorDocument 处理请求时遇到 404 Not Found 错误。

如果有任何帮助,我将不胜感激。

最好的问候

“..plugins/.htaccess”:

'# This file is auto generated by Piwik, do not edit directly
# Please report any issue or improvement directly to the Piwik team.

# First, deny access to all files in this directory
<Files "*">
<IfModule mod_version.c>
        <IfVersion < 2.4>
                Order Deny,Allow
                Deny from All
        </IfVersion>
        <IfVersion >= 2.4>
                Require all denied
        </IfVersion>
</IfModule>
<IfModule !mod_version.c>
        <IfModule !mod_authz_core.c>
                Order Deny,Allow
                Deny from All
        </IfModule>
        <IfModule mod_authz_core.c>
                Require all denied
        </IfModule>
</IfModule>
</Files>
# Serve HTML files as text/html mime type - Note: requires mod_mime apache module!
<IfModule mod_mime.c>
   AddHandler text/html .html
   AddHandler text/html .htm
</IfModule>

# Allow to serve static files which are safe
<Files ~ "\.(gif|ico|jpg|png|svg|js|css|htm|html|swf|mp3|mp4|wav|ogg|avi|ttf|eot)$">
<IfModule mod_version.c>
        <IfVersion < 2.4>
                Order Allow,Deny
                Allow from All
        </IfVersion>
        <IfVersion >= 2.4>
                Order Allow,Deny
                Allow from All
                #Require all granted
        </IfVersion>
</IfModule>
<IfModule !mod_version.c>
        <IfModule !mod_authz_core.c>
                Order Allow,Deny
                Allow from All
        </IfModule>
        <IfModule mod_authz_core.c>
                Order Allow,Deny
                Allow from All
                #Require all granted
        </IfModule>
</IfModule>
</Files>'

【问题讨论】:

  • 您是否在 php 错误日志中收到任何错误?你是从主页上的 zip 还是从 github 安装的?
  • 我是从主页上的 zip 安装的。我在 apache 日志中只有错误:[core:alert] [pid 19946:tid 140541675198208] [client ip-address:62554] /appbase/http/piwiktest/plugins/.htaccess:
  • 您是否可能已禁用 .htaccess 文件? serverfault.com/a/529015
  • 我已经注释了“../piwik/plugins/.htaccess”和“../piwik/libs/.htaccess”中的所有行(文件内容见上文)。这解决了我的问题。至少页面/图像显示正确。

标签: php rhel matomo


【解决方案1】:

我已经注释了“../piwik/plugins/.htaccess”和“../piwik/libs/.htaccess”中的所有行(文件内容见上文)。这解决了我的问题。至少页面/图像显示正确。

【讨论】:

    猜你喜欢
    • 2011-04-29
    • 2019-12-13
    • 1970-01-01
    • 2012-07-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多