<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello, Scott.<br>
      <br>
      I think, you can try $request_length.<br>
      Here is a convenient link to help you with your task:
      <a class="moz-txt-link-freetext" href="http://nginx.org/en/docs/varindex.html">http://nginx.org/en/docs/varindex.html</a><br>
      Most of times you can find a proper variable there.<br>
      <br>
      On 11.07.2018 16:53, Callum Scott wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAECu8ogeUyz23kckJ2ixE1Hq1pKu4zajmZEb1+W=g6BXz+B+AA@mail.gmail.com">
      <div dir="ltr">
        <div>I'm currently looking at swapping out some of our Apache
          web servers for Nginx to act as a reverse proxy.</div>
        <div><br>
        </div>
        <div>One of my issues is that I need, at least in the short
          term, for the log format to remain the same.</div>
        <div><br>
        </div>
        <div>I have two issues that are cropping up.</div>
        <div><br>
        </div>
        <div>The first is that with my current configuration I am
          getting the following error if I try to start nginx:</div>
        <div><br>
        </div>
        <div>nginx: [emerg] unknown "bytes_received" variable<br>
        </div>
        <div><br>
        </div>
        <div>I am using the latest version avialble in the nginx repo:<br>
        </div>
        <div><br>
        </div>
        <div># nginx -V<br>
          nginx version: nginx/1.14.0<br>
          built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)<br>
          built with OpenSSL 1.0.1e-fips 11 Feb 2013<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 -Wp,-D_FORTIFY_SOURCE=2
          -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
          -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now
          -pie'<br>
          <br>
        </div>
        <div>
          <div>Secondaly i am unable to find an equivelent for the:</div>
          <div><br>
          </div>
          <div>%f, %R or %l apache logs</div>
          <div><br>
          </div>
          <div>This is the log file I am trying to replicate:</div>
          <div>LogFormat
"%v,%V,%h,%l,%u,%t,\"%m\",\"%U\",\"%q\",\"%H\",\"%{UNIQUE_ID}e\",%>s,\"%{Referer}i\",\"%{User-Agent}i\",\"%{SSL_PROTOCOL}x\",\"%{SSL_CIPHER}x\",%p,%D,%I,%O,%B,\"%R\",\"%f\""
            vhostcombined<br>
          </div>
          <div><br>
          </div>
          <div>and what I have so far:</div>
          <div><br>
          </div>
          <div>    log_format  proxylog
            '$server_name,$hostname,$remote_addr,-,$remote_user,[$time_local],'<br>
                                    
            '"$request_method","$request_uri","$query_string",'<br>
                                    
            '"$server_protocol","$request_id","$status","$http_referer,"'<br>
                                    
            '"$http_user_agent","$ssl_protocol","$ssl_cipher",$server_port,'<br>
                                    
            '$request_time,$bytes_received,$bytes_sent,"proxy-server"';</div>
          <div><br>
          </div>
          <div>Any pointers for the above issues would be gratefully
            received.<br>
          </div>
          <div>-- <br>
            <div dir="ltr" class="gmail_signature">Callum</div>
          </div>
        </div>
      </div>
      <!--'"--><br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>