I assumed that I could simply hardcode the SCRIPT_FILENAME but I keep getting "File not found." errors. This is what I have:
location =/wp-content/plugins/foo/analytics.js {
fastcgi_pass localhost:9000;
fastcgi_param SCRIPT_FILENAME /home/deploy/wordpress/wp-content/plugins/foo/analytics.js.php;
include fastcgi_params;
}
What's the proper way of doing this? I don't want to do a URL rewrite where I redirect from .js
to .js.php
. The file exists in the location specified in nginx.