My nginx config part (successfully working)
... *config* ...
location ~ \.php$ {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php break;
}
set $nocache "";
include fastcgi_params;
fastcgi_pass php-fpm;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/folder/$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT /var/www/folder/;
fastcgi_intercept_errors on;
fastcgi_cache_use_stale error timeout invalid_header http_500;
fastcgi_cache_key $host$request_uri;
# fastcgi_cache folder;
fastcgi_cache_valid 200 1m;
fastcgi_cache_bypass $nocache;
fastcgi_no_cache $nocache;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
proxy_connect_timeout 900;
proxy_send_timeout 900;
proxy_read_timeout 900;
fastcgi_send_timeout 900;
fastcgi_read_timeout 900;
}
Now I needed to add rewrite rule for /my/operation => /my.php?operation
location /my/ {
rewrite ^(.*)$ /my.php?$1 break;
}
Rewrite rule is working, but php file is downloading, not executing.
I'm newbie in Nginx, so I need help