I have a Joomla installed and need to allow users run one PHP file from /media folder. How to do it?
With current config, Nginx returnes this PHP as file for download, without executing it. Here is a part of my config:
location ~* /media {
allow all;
expires 1d;
}
location /media/dir/test.php {
fastcgi_pass unix:/var/run/php5-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location / {
#PHP here works fine
try_files $uri $uri/ /index.php?$args;
# .. skipped ...
}