首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Bolt-CMS没有显示图像(helios模板)

Bolt-CMS没有显示图像(helios模板)
EN

Stack Overflow用户
提问于 2015-04-16 06:47:09
回答 3查看 2K关注 0票数 1

我刚刚安装了Bolt,我没有太多的时间来学习整个CMS。我上传到“文件”的所有图片都没有显示在仪表板上。它们被重命名为/1000x1000r/xxxx.xxx,没有出现。有人能告诉我发生了什么,在哪里配置,以便他们开始显示。

这是我的.htaccess代码。我根本没有修改过它:

代码语言:javascript
复制
# Set the default handler.
DirectoryIndex index.php index.html index.htm

# Prevent directory listing
Options -Indexes

# Make sure MultiViews is disabled if available.
<IfModule mod_negotiation.c>
  Options -MultiViews
</IfModule>

<FilesMatch "\.(yml|db|twig|md)$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
  </IfModule>
</FilesMatch>

<IfModule mod_rewrite.c>
  RewriteEngine on

  RewriteRule cache/ - [F]

  # Some servers require the RewriteBase to be set. If so, set to the correct folder.
  # RewriteBase /

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^ ./index.php [L]

</IfModule>


# set the correct mime type for woff2 font type
# =============================================
# if you don't set your own mimetypes or you aren't using
# HTML5 Boilerplate Server Configs https://github.com/h5bp/server-configs-apache
# then you can uncomment (delete the hash/pound/octothorpe/number symbol) the section below:

#<IfModule mod_mime.c>
#  AddType application/font-woff2    woff2
#</IfModule>

当我打开仪表板文件传送器时,我得到以下信息。图片不显示在仪表板和我的网站上。

以下是我的浏览器控制台日志:

代码语言:javascript
复制
files:757 GET http://localhost/www/bolt/thumbs/54x40c/analog-camera-photography-vintage-1844.jpg 500 (Internal Server Error)
files:757 GET http://localhost/www/bolt/thumbs/54x40c/alarm-clock-gold-hands-of-a-clock-1778.jpg 500 (Internal Server Error)
files:597 GET http://localhost/www/bolt/thumbs/54x40c/agriculture-cereals-field-621.jpg 500 (Internal Server Error)
files:918 GET http://localhost/www/bolt/thumbs/54x40c/apple-desk-iphone-2750.jpg 500 (Internal Server Error)
files:918 GET http://localhost/www/bolt/thumbs/54x40c/architecture-books-building-2757.jpg 500 (Internal Server Error)
files:1081 GET http://localhost/www/bolt/thumbs/54x40c/bell-bills-cash-register-2738.jpg 500 (Internal Server Error)
files:1856 GET http://localhost/www/bolt/app/view/js/maps/lib.min.js.map 404 (Not Found)
files:1 GET http://localhost/www/bolt/app/view/js/maps/bolt.min.js.map 404 (Not Found)
files:1081 GET http://localhost/www/bolt/thumbs/54x40c/blur-breakfast-coffee-271.jpg 500 (Internal Server Error)
files:1245 GET http://localhost/www/bolt/thumbs/54x40c/blur-flowers-home-1093.jpg 500 (Internal Server Error)
files:1245 GET http://localhost/www/bolt/thumbs/54x40c/building-frame-garage-1599.jpg 500 (Internal Server Error)
files:1406 GET http://localhost/www/bolt/thumbs/54x40c/california-foggy-golden-gate-bridge-2771.jpg 500 (Internal Server Error)
files:1406 GET http://localhost/www/bolt/thumbs/54x40c/carrot-cooking-eat-1398.jpg 500 (Internal Server Error)
files:1574 GET http://localhost/www/bolt/thumbs/54x40c/configure-disc-jockey-disco-1504.jpg 500 (Internal Server Error)
files:1574 GET http://localhost/www/bolt/thumbs/54x40c/food-fruit-orange-1286.jpg 500 (Internal Server Error)
files:1745 GET http://localhost/www/bolt/thumbs/54x40c/garden-gardening-grass-589.jpg 500 (Internal Server Error)
files:1819 GET http://localhost/www/bolt/thumbs/54x40c/keyboard-old-technology-2318.jpg 500 (Internal Server Error)
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2015-04-20 19:15:40

简单的解决办法。这就是了。首先,需要确保在.htaccess文件中取消对# RewriteBase /行的注释,并将其设置为本地站点文件夹。HTACCESS文件有很好的文档记录,但是他们的眼睛可能会忽略这一点。一旦您将站点迁移到生产,不要忘记您需要修复这个值。

如果缩略图没有显示,那就意味着php环境需要文件扩展名来显示文件信息。找到并取消评论行extension=php_fileinfo.dll重启Apache,您就可以继续了!

票数 7
EN

Stack Overflow用户

发布于 2015-04-16 16:59:42

听起来这些图片上传得很好,但是缩略图没有显示出来。在这种情况下,很可能是重写的问题。如果您正在使用Apache,请检查.htaccess文件是否已就位。如果您正在使用nginx 看这张吉特布的票作为帮助。

票数 0
EN

Stack Overflow用户

发布于 2015-04-17 18:57:11

这些问题的99%是由沿线某个地方的不正确权限引起的。

当您请求/thumbs/xxx样式url时,web服务器需要能够:

  1. 读取原始文件( file /xxxx.jpg)
  2. 将创建的缩略图写入缓存目录(app/ cache /xxxx)
  3. 如果save_files在config.yml中为真,可选地将缩略图复制到/thumbs文件夹。

对于这些文件夹,web服务器将需要对文件夹进行读/写/执行perms。看看这个,看看它是否能解决问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29667270

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档