Welcome! Log In Create A New Profile

Advanced

Re: nginx - php-fpm: access restrictions for some php pages

January 31, 2013 09:12AM
> Re-reading that, it comes across as more abrupt than I intended. Sorry
> about that.

No problem; unfortunately my english is poor, so easily I run into
misunderstandings when I communicate in english with other people.

> If you can now tell what I meant in the previous mail, can you suggest
> any phrasing or extra information that would have made it clear on
> first reading?

An extra information which would have been useful to me is a configuration
code example, because is less prone to misunderstandings by me (due to my
comprehension skills), or maybe some link about the matter I submitted (if
known), because I couldn't find on the web any infos about the needings I have
(maybe just because the solution is trivial).

Anyway, I have a doubt: in the previous reply you sent, you say

> Your very first example was almost correct. You had
>
> location = /some/path/phpinfo.php {
> }
>
> which you said was the one location which matched the request that you
> cared about.
>
> In *that* location, put all of the configuration that you want for
> that request.

So I think you mean something like this:

location = /some/path/phpinfo.php {
# common configurations...
# configuration for some children urls...
}
location ~ \/some\/path\/(.*\.php)$ {
# common configurations...
}

I found that a nested locations configuration works too:

location ~ ^\/some\/path\/(.*\.php)$ {
# configuration for some children urls...
location ~ \/phpinfo\.php$ {
# common configurations...
}
}

Of the two options I would prefer the last, because I avoid to write two
different configurations equal between each other, which would imply that every
time I change one configuration I have to duplicate it into the other location
(but above all I have a loss of logic). Do you have some considerations which
maybe I miss about the difference between the two configurations?
SubjectAuthorPosted

nginx - php-fpm: access restrictions for some php pages

m.desantisJanuary 31, 2013 06:22AM

Re: nginx - php-fpm: access restrictions for some php pages

Francis DalyJanuary 31, 2013 06:40AM

Re: nginx - php-fpm: access restrictions for some php pages

m.desantisJanuary 31, 2013 06:53AM

Re: nginx - php-fpm: access restrictions for some php pages

Francis DalyJanuary 31, 2013 07:04AM

Re: nginx - php-fpm: access restrictions for some php pages

Francis DalyJanuary 31, 2013 07:36AM

Re: nginx - php-fpm: access restrictions for some php pages

m.desantisJanuary 31, 2013 09:12AM

Re: nginx - php-fpm: access restrictions for some php pages

Francis DalyJanuary 31, 2013 02:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 165 on April 21, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready