我已经在nginx上安装了Drupal 6,但是我遇到了imagecache问题 - 查看任何图像都会生成空白屏幕。
安装了PHP GD:
# php -m | grep gd
gd
站点文件夹上的<7> 777及其中的所有内容:
ls -l | grep sites
drwxrwxrwx 4 nginx nginx 4096 Jan 12 23:36 sites
vhost.conf:
location / {
# This is cool because no php is touched for static content
try_files $uri @rewrite;
}
location @rewrite {
# You have 2 options here
# For D7 and above:
# Clean URLs are handled in drupal_environment_initialize().
#rewrite ^ /index.php;
# For Drupal 6 and bwlow:
# Some modules enforce no slash (/) at the end of the URL
# Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
# Fighting with Styles? This little gem is amazing.
# This is for D6
location ~ ^/sites/.*/files/imagecache/ {
# This is for D7 and D8
#location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
Drupal日志中有错误:
imagecache 2014-01-13 21:29 404: Unable to find low.jpg guest
nginx error.log中没有错误(仅在access.log = 404中)或php错误日志。
文件存在于
中/sites/default/files/
打开imagecache模块后,imagecache_sample.png正确创建。
有什么想法吗?