Score:0

Nginx location serve PHP in directory

za flag

In transitioning from Apache to nginx in Docker for my Drupal dev I have an edge case that I cannot determine the proper rule. Because Drupal defaults every .php to index.php, I followed its white list syntax prior to this default to serve up all php files in a given directory. OK, now let's try to figure out why this always returns a 404. I have set this rule in this order.

location ~* ^/donate/[^/]*\.php$ { fastcgi_pass php; } location ~* ^.+\.php$ {return 404;}

I'm expecting mywebsite/donate/foo.php, /donate/bar.php, etc to be served. Pointers to use in my search would be appreciated.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.