In my php.ini, I have disabled allow_url_fopen. I would like to enable it for my /example directory as shown below, but it does not work. However, if I move the directive to allow it from /example to the ~.php$ location above it, then it works fine. I'm thinking that the /example location block is never processed. Any ideas how to allow url fopen to work only in the /example directory?
server {
location ~\.php$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
}
location /example {
fastcgi_param PHP_ADMIN_VALUE "allow_url_fopen=1";
}
}