<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 18, 2023 at 11:19 PM Sergey A. Osokin <<a href="mailto:osa@freebsd.org.ru">osa@freebsd.org.ru</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Kaushal,<br>
<br>
On Mon, Dec 18, 2023 at 10:24:14PM +0530, Kaushal Shriyan wrote:<br>
> <br>
> I am running nginx version: nginx/1.24.0 as reverse proxy on CentOS Linux<br>
> release 7.9.2009 (Core). I have the below config<br>
> file /etc/nginx/conf.d/microservice.conf<br>
> I want to capture full request/response body logging in nginx.<br>
<br>
Since you question is related to a third-party module, I'd recommend<br>
to get support in a appropriate mailing list.<br><br></blockquote><div><br></div><div>Thanks Sergey for the quick response. Is there a way to capture full request/response body logging in nginx without Lua module support? Please ignore the earlier OS version, CentOS Linux release 7.9.2009 (Core). </div><div><br></div><div>#cat /etc/redhat-release</div><div>Red Hat Enterprise Linux release 8.8 (Ootpa)</div><div># nginx -V<br>nginx version: nginx/1.24.0<br>built by gcc 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)<br>built with OpenSSL 1.1.1k  FIPS 25 Mar 2021<br>TLS SNI support enabled<br>configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'<br><br></div><div># rpm -qa | grep nginx<br>nginx-1.24.0-1.el8.ngx.x86_64<br>#nginx -v</div><div>nginx version: nginx/1.24.0<br>#</div><div><br></div><div># yum search nginx<br>Updating Subscription Management repositories.<br>Last metadata expiration check: 3:07:49 ago on Mon 18 Dec 2023 08:40:51 PM IST.<br>================================================================ Name Exactly Matched: nginx =================================================================<br>nginx.x86_64 : High performance web server<br>=============================================================== Name & Summary Matched: nginx ================================================================<br>collectd-nginx.x86_64 : Nginx plugin for collectd<br>lemonldap-ng-nginx.noarch : LemonLDAP-NG Nginx support<br>munin-nginx.noarch : NGINX support for Munin resource monitoring<br>nginx-all-modules.noarch : A meta package that installs all available Nginx modules<br>nginx-debuginfo.x86_64 : Debug information for package nginx<br>nginx-filesystem.noarch : The basic directory layout for the Nginx server<br>nginx-mod-http-image-filter.x86_64 : Nginx HTTP image filter module<br>nginx-mod-http-perl.x86_64 : Nginx HTTP perl module<br>nginx-mod-http-xslt-filter.x86_64 : Nginx XSLT module<br>nginx-mod-mail.x86_64 : Nginx mail modules<br>nginx-mod-stream.x86_64 : Nginx stream modules<br>nginx-module-image-filter.x86_64 : nginx image filter dynamic module<br>nginx-module-image-filter-debuginfo.x86_64 : Debug information for package nginx-module-image-filter<br>nginx-module-njs.x86_64 : nginx njs dynamic modules<br>nginx-module-njs-debuginfo.x86_64 : Debug information for package nginx-module-njs<br>nginx-module-perl.x86_64 : nginx Perl dynamic module<br>nginx-module-perl-debuginfo.x86_64 : Debug information for package nginx-module-perl<br>nginx-module-xslt.x86_64 : nginx xslt dynamic module<br>nginx-module-xslt-debuginfo.x86_64 : Debug information for package nginx-module-xslt<br>pagure-web-nginx.noarch : Nginx configuration for Pagure<br>pcp-pmda-nginx.x86_64 : Performance Co-Pilot (PCP) metrics for the Nginx Webserver<br>python3-certbot-nginx.noarch : The nginx plugin for certbot<br>sympa-nginx.x86_64 : Sympa with nginx<br># yum -y install nginx-all-modules.noarch<br>Updating Subscription Management repositories.<br>Last metadata expiration check: 3:08:26 ago on Mon 18 Dec 2023 08:40:51 PM IST.<br>Dependencies resolved.<br>==============================================================================================================================================================<br> Package                               Architecture     Version                                              Repository                                  Size<br>==============================================================================================================================================================<br>Installing:<br> nginx-all-modules                     noarch           1:1.14.1-9.module+el8.0.0+4108+af250afe              rhel-8-for-x86_64-appstream-rpms            24 k<br>Installing dependencies:<br> nginx-mod-http-image-filter           x86_64           1:1.14.1-9.module+el8.0.0+4108+af250afe              rhel-8-for-x86_64-appstream-rpms            35 k<br> nginx-mod-http-perl                   x86_64           1:1.14.1-9.module+el8.0.0+4108+af250afe              rhel-8-for-x86_64-appstream-rpms            46 k<br> nginx-mod-http-xslt-filter            x86_64           1:1.14.1-9.module+el8.0.0+4108+af250afe              rhel-8-for-x86_64-appstream-rpms            34 k<br> nginx-mod-mail                        x86_64           1:1.14.1-9.module+el8.0.0+4108+af250afe              rhel-8-for-x86_64-appstream-rpms            64 k<br> nginx-mod-stream                      x86_64           1:1.14.1-9.module+el8.0.0+4108+af250afe              rhel-8-for-x86_64-appstream-rpms            85 k<br>Enabling module streams:<br> nginx                                                  1.14<br><br>Transaction Summary<br>==============================================================================================================================================================<br>Install  6 Packages<br><br>Total download size: 287 k<br>Installed size: 399 k<br>Downloading Packages:<br>(1/6): nginx-all-modules-1.14.1-9.module+el8.0.0+4108+af250afe.noarch.rpm                                                      10 kB/s |  24 kB     00:02<br>(2/6): nginx-mod-http-image-filter-1.14.1-9.module+el8.0.0+4108+af250afe.x86_64.rpm                                            15 kB/s |  35 kB     00:02<br>(3/6): nginx-mod-http-perl-1.14.1-9.module+el8.0.0+4108+af250afe.x86_64.rpm                                                    20 kB/s |  46 kB     00:02<br>(4/6): nginx-mod-http-xslt-filter-1.14.1-9.module+el8.0.0+4108+af250afe.x86_64.rpm                                             17 kB/s |  34 kB     00:02<br>(5/6): nginx-mod-mail-1.14.1-9.module+el8.0.0+4108+af250afe.x86_64.rpm                                                         32 kB/s |  64 kB     00:02<br>(6/6): nginx-mod-stream-1.14.1-9.module+el8.0.0+4108+af250afe.x86_64.rpm                                                       43 kB/s |  85 kB     00:02<br>--------------------------------------------------------------------------------------------------------------------------------------------------------------<br>Total                                                                                                                          67 kB/s | 287 kB     00:04<br>Running transaction check<br>Transaction check succeeded.<br>Running transaction test<br>Transaction test succeeded.<br>Running transaction<br>  Preparing        :                                                                                                                                      1/1<br>  Installing       : nginx-mod-stream-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                                      1/6<br>  Running scriptlet: nginx-mod-stream-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                                      1/6<br>  Installing       : nginx-mod-mail-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                                        2/6<br>  Running scriptlet: nginx-mod-mail-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                                        2/6<br>  Installing       : nginx-mod-http-xslt-filter-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                            3/6<br>  Running scriptlet: nginx-mod-http-xslt-filter-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                            3/6<br>  Installing       : nginx-mod-http-perl-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                                   4/6<br>  Running scriptlet: nginx-mod-http-perl-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                                   4/6<br>  Installing       : nginx-mod-http-image-filter-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                           5/6<br>  Running scriptlet: nginx-mod-http-image-filter-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                           5/6<br>  Installing       : nginx-all-modules-1:1.14.1-9.module+el8.0.0+4108+af250afe.noarch                                                                     6/6<br>  Running scriptlet: nginx-all-modules-1:1.14.1-9.module+el8.0.0+4108+af250afe.noarch                                                                     6/6<br>  Verifying        : nginx-all-modules-1:1.14.1-9.module+el8.0.0+4108+af250afe.noarch                                                                     1/6<br>  Verifying        : nginx-mod-http-image-filter-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                           2/6<br>  Verifying        : nginx-mod-http-perl-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                                   3/6<br>  Verifying        : nginx-mod-http-xslt-filter-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                            4/6<br>  Verifying        : nginx-mod-mail-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                                        5/6<br>  Verifying        : nginx-mod-stream-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64                                                                      6/6<br>Installed products updated.<br><br>Installed:<br>  nginx-all-modules-1:1.14.1-9.module+el8.0.0+4108+af250afe.noarch          nginx-mod-http-image-filter-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64<br>  nginx-mod-http-perl-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64        nginx-mod-http-xslt-filter-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64<br>  nginx-mod-mail-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64             nginx-mod-stream-1:1.14.1-9.module+el8.0.0+4108+af250afe.x86_64<br><br>Complete!</div><div><br># nginx -t<br>nginx: [emerg] unknown directive "log_by_lua_block" in /etc/nginx/conf.d/microservice.conf:8<br>nginx: configuration file /etc/nginx/nginx.conf test failed<br>#<br></div><div><br></div><div>Please guide me. Thanks in advance.<br><br>Best Regards,<br><br>Kaushal<br></div></div></div>