N
N
Nurlan2016-10-25 13:57:34
PHP
Nurlan, 2016-10-25 13:57:34

How to get request_id?

I want to transfer request_id to PHP
Registered ; And in "location /" and in "location ~ \.php$", I display $_SERVER on the server and do not find what I expected. Questions also arise because I have version 1.10.1, and the changelog saysproxy_set_header x-request_id $request_id

Изменения в nginx 1.11.0                                          24.05.2016
   *) Добавление: переменная $request_id.

Although here is a line from nginx -V:
"--add-module=/usr/src/builddir/debian/modules/nginx-x-rid-header"
That is, I have the module installed.
What to do, where to dig?
UPD:
configure arguments: 
--add-module=/usr/src/builddir/debian/modules/naxsi/naxsi_src 
--with-cc-opt='-g -O2 -fstack-protector 
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' 
--with-ld-opt='-Wl,-z,relro -Wl,-z,now' 
--prefix=/usr/share/nginx 
--conf-path=/etc/nginx/nginx.conf 
--http-log-path=/var/log/nginx/access.log 
--error-log-path=/var/log/nginx/error.log 
--lock-path=/var/lock/nginx.lock 
--pid-path=/run/nginx.pid 
--modules-path=/usr/lib/nginx/modules 
--http-client-body-temp-path=/var/lib/nginx/body 
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi 
--http-proxy-temp-path=/var/lib/nginx/proxy 
--http-scgi-temp-path=/var/lib/nginx/scgi 
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi 
--with-debug 
--with-pcre-jit 
--with-ipv6 
--with-http_ssl_module 
--with-http_stub_status_module 
--with-http_realip_module 
--with-http_auth_request_module 
--with-http_v2_module 
--with-http_dav_module 
--with-file-aio 
--with-threads 
--with-http_addition_module 
--with-http_flv_module 
--with-http_geoip_module=dynamic 
--with-http_gunzip_module 
--with-http_gzip_static_module 
--with-http_image_filter_module=dynamic 
--with-http_mp4_module 
--with-http_perl_module=dynamic 
--with-http_random_index_module 
--with-http_secure_link_module 
--with-http_sub_module 
--with-http_xslt_module=dynamic 
--with-mail=dynamic 
--with-mail_ssl_module 
--with-stream=dynamic 
--with-stream_ssl_module 
--add-module=/usr/src/builddir/debian/modules/headers-more-nginx-module 
--add-dynamic-module=/usr/src/builddir/debian/modules/nginx-auth-pam 
--add-module=/usr/src/builddir/debian/modules/nginx-cache-purge 
--add-module=/usr/src/builddir/debian/modules/nginx-dav-ext-module 
--add-dynamic-module=/usr/src/builddir/debian/modules/nginx-development-kit 
--add-module=/usr/src/builddir/debian/modules/nginx-echo 
--add-module=/usr/src/builddir/debian/modules/ngx-fancyindex 
--add-module=/usr/src/builddir/debian/modules/nginx-push-stream-module 
--add-dynamic-module=/usr/src/builddir/debian/modules/nginx-lua 
--add-module=/usr/src/builddir/debian/modules/nginx-upload-progress 
--add-module=/usr/src/builddir/debian/modules/nginx-upstream-fair 
--add-module=/usr/src/builddir/debian/modules/ngx_http_substitutions_filter_module 
--add-module=/usr/src/builddir/debian/modules/nginx-auth-ldap 
--add-module=/usr/src/builddir/debian/modules/ngx_http_pinba_module 
--add-module=/usr/src/builddir/debian/modules/ngx_pagespeed 
--add-module=/usr/src/builddir/debian/modules/nginx-x-rid-header 
--add-module=/usr/src/builddir/debian/modules/nginx-rtmp-module 
--with-ld-opt=-lossp-uuid

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nurlan, 2016-10-25
@daager

Helped: fastcgi_param x-request_id $request_id;

R
romy4, 2016-10-25
@romy4

did you read it in the manual?
On Linux, you should also add --with-ld-opt=-lossp-uuid or whatever flavor of uuid-devel comes with your distribution

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question