Page 1 of 1

Nginx + FPM-PHP .conf files - is the logic correct?

Posted: Mon May 02, 2016 1:06 pm
by SS88
Hey guys.

I just wanted to know if the correct set-up for this is "logic"?

You place location ~ [^/]\.php(/|$) { inside location / { and by doing this it makes it difficult to do "extra things" (such as password protect a directory) in nginx.<website>.conf

If you want to password protect a directory you have to create a new location and also include a duplicate of location ~ [^/]\.php(/|$) { because you have already placed this inside location / {

If you remove location / { and just add location ~ [^/]\.php(/|$) { then the majority of rules and locations work again. Does this make sense?

Re: Nginx + FPM-PHP .conf files - is the logic correct?

Posted: Tue May 03, 2016 10:56 am
by Elizine
Yes, the logic is correct. Please refer the link below for tips and tricks -
http://www.if-not-true-then-false.com/2 ... nd-tricks/