get nginx version remote
Antoine Bonavita
antoine.bonavita at gmail.com
Wed Dec 21 09:30:31 UTC 2011
Actually, by default (at least with the debian packages from
nginx.org) it's in the Server header:
Server: nginx/1.0.11
A.
On Wed, Dec 21, 2011 at 9:58 AM, António P. P. Almeida <appa at perusio.net> wrote:
> On 21 Dez 2011 08h49 WET, iafilius at xs4all.nl wrote:
>
>> Hello,
>>
>> we use nginx as reverse proxy for some websites, and we'd like to
>> get the nginx version for administration purposes.
>>
>> Is there as way to get nginx's version remote, for example like the
>> same way as the HttpStubStatusModule (restricted url/access) ?
>
> map $remote_addr $can_have_version {
> default 0;
> 192.168.96.0/24 1; # put your allowed IP list here
> }
>
>
> location /nginx-version {
> if ($can_have_version) {
> return 200 "nginx version: $nginx_version\n";
> }
> return 403;
> }
>
> This is one way another would be using a key with an arg like this:
>
> location /nginx-version {
> if ($arg_k = mychosenkey) {
> return 200 "nginx version: $nginx_version\n";
> }
> return 403;
> }
>
> You would request the version with:
>
> http://myhost.com/nginx-version?k=mychosenkey
>
> Just two examples, plenty of other possible ways to go about it.
>
> --- appa
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
More information about the nginx
mailing list