Nginx + FPM-PHP .conf files - is the logic correct?
Nginx + FPM-PHP .conf files - is the logic correct?
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?
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?
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/
http://www.if-not-true-then-false.com/2 ... nd-tricks/