내 Rails 앱은 ImageMagick을 사용하지만 ImageMagick 명령 ("식별")을 실행하려고하면 앱이 실패합니다. 내 아파치 설정에서 다음과 같은 환경 변수를 전달하여 (I 아파치/승객을 실행 해요) 개발에서이 문제를 해결 :ImageMagick 환경 변수를 nginx 잡종에 어떻게 전달합니까?
SetEnv MAGICK_HOME /opt/local/var/macports/software/ImageMagick/6.5.9-0_0+q16
SetEnv DYLD_LIBRARY_PATH /opt/local/var/macports/software/ImageMagick/6.5.9-0_0+q16/opt/local/lib
SetEnv PATH /usr/bin:/opt/local/var/macports/software/ImageMagick/6.5.9-0_0+q16/opt/local/bin
는하지만, 내 생산 환경은 Nginx에와 잡종 (내가 설정하지 뭔가를 실행), 그리고 그 변수를 앱에 전달하는 방법을 잘 모르겠습니다.
# user and group to run as
user mouthbreather mouthbreather;
worker_processes 4;
# pid of nginx master process
pid /var/run/nginx.pid;
events {
worker_connections 8192;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/engineyard/nginx/access.log main;
error_log /var/log/engineyard/nginx/error.log notice;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_proxied any;
gzip_buffers 16 8k;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
include /etc/nginx/sites/*.conf;
}
그래서 제 질문은 다음과 같습니다 : 다음과 같이 내 nginx.conf 파일은 현재
- 어떻게 내 MAGICK_HOME 생산에 어디에서 확인할 수 있습니까?
- 어떻게 이러한 변수를 nginx.conf를 통해 앱에 전달할 수 있습니까?
고마워요!