Nginx + FPM-PHP .conf files - is the logic correct?
Posted: Mon May 02, 2016 1:06 pm
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?