Есть конфиг nginx, для CMS joomla
server {
server_name subdomain.domain.ru;
server_name_in_redirect off;
root /var/www/domain/subdomain;
index index.php index.html index.htm default.html default.htm;
location ~ /plugins/content/jumultithumb/img/(.*).jpg$ {
#deny all;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index img.php;
fastcgi_buffers 8 64k;
fastcgi_buffer_size 128k;
fastcgi_param SCRIPT_FILENAME $document_root/plugins/content/jumultithumb/img/img.php?src=$1;
include fastcgi_params;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_buffers 8 64k;
fastcgi_buffer_size 128k;
fastcgi_param SCRIPT_FILENAME $document_root/index.php?$query_string;
include fastcgi_params;
}
# caching of files
location ~* \.(ico|pdf|flv)$ {
expires 1y;
}
location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
expires 14d;
}
[error] 22367#0: *565 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 8.8.8.8, server: moruch.kholmsk.ru, request: "GET /plugins/content/jumultithumb/img/Li4vLi4vLi4vLi4vaW1hZ2VzL21vcnVjaDI0MHgxMjAuZ2lmJnc9MjIwJmg9MTIwJnE9OTAmYW9lPTE=.jpg HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:"
Получилось сделать
location ~ /plugins/content/jumultithumb/img/(.*).jpg$ {
rewrite ^/plugins/content/jumultithumb/img/([^_]*)\.jpg$ /plugins/content/jumultithumb/img/img.php?src=$1 last;
}