Answer the question
In order to leave comments, you need to log in
Help with nginx config
There is an nginx config for 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:"
Answer the question
In order to leave comments, you need to log in
Add
rewrite ^/plugins/content/jumultithumb/img/([^_]*)\.jpg$ /img.php?src=$1 break;
in location /
A location ~ /plugins/content/jumultithumb/img/(.*).jpg$ - remove
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question