I am trying to make it so my default server only allows access to one PHP file for AWS ELB's health check. I need PHP to serve it so it knows PHP is up/running on the instance. I am able to do the following to deny access with a 403:
server {
listen 443 ssl;
location /path/elb.php {
fastcgi_param SCRIPT_FILENAME /path/to/elb.php;
include fastcgi.conf;
allow all;
}
deny all;
}
However, ideally I want to use return 444;
instead of deny all;
. It appears that using return 444;
supersedes the location statement above it, as it will not work. Any suggestions, or is using deny all;
the best I will get in my scenario?
Thanks!