In my app with RefineryCMS I'm having problems with images - it uploads fine and available by url like:
http://localhost:3000/system/images/W1siZiIsIjIwMTUvMDkvMTQvMTRfMzJfNTVfOTEyXzIuanBnIl1d/2.jpg
The problem is on refinery admin panel and on site fails with 502 error. As I understand refinery images transforming images for thumbnails with help of imagemagick and trying to display it on the site.
I'm using refinerycms 1.0.9, unicorn as webserver and nginx as http server
my example nginx config for site:
server {
listen 80;
server_name example.com
root /home/deploy/example/current/public;
charset UTF-8;
access_log /var/log/nginx/example-access.log;
error_log /var/log/nginx/example-error.log;
try_files $uri @unicorn;
server_tokens off;
location @unicorn {
proxy_pass http://unix:/home/deploy/example/shared/unicorn.sock;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_connect_timeout 1200;
proxy_send_timeout 1200;
proxy_read_timeout 1200;
send_timeout 1200;
}
location /system/images {
proxy_pass http://unix:/home/deploy/example/shared/unicorn.sock;
proxy_cache dragonfly;
proxy_cache_valid 200 30d;
}
}
my custom config for refinery images:
require 'dragonfly'
app = Dragonfly[:refinery_images]
app.configure_with(:imagemagick)
app.configure do |c|
c.convert_command = "/usr/local/bin/convert"
c.identify_command = "/usr/local/bin/identify"
end
How can I solve the problem and display images?
Thanks
Aucun commentaire:
Enregistrer un commentaire