download logging not captured in access.log

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

download logging not captured in access.log

wld75
Hi,

I have a server running for client to download and upload files, however i
am only able to see the upload request logs and download requests not
captured in the access.log file.

Thanks for advance.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,281572,281572#msg-281572

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: download logging not captured in access.log

Maxim Dounin
Hello!

On Thu, Oct 11, 2018 at 10:47:56AM -0400, wld75 wrote:

> I have a server running for client to download and upload files, however i
> am only able to see the upload request logs and download requests not
> captured in the access.log file.

In nginx, two things should be kept in mind when looking into
access logs:

1. Requests are logged into access log once the request is
complete.  This may take a while in some cases.

2. Logging details can be configured in nginx.conf, and may vary
widely from a configuration to configuration.  In particular,
logging can be disabled for particular servers or locations, or
logging can be configured to use different log files for different
requests.

If you don't see download requests being logged, most likely the
problem is that nginx was configured to avoid logging of such
requests, or you are looking into the wrong log file.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: download logging not captured in access.log

wld75
Hello,

Thanks for your support.

I have verified the nginx.conf and found no abnormality in logging section:
please see below from the nginx.conf.
i can see all requests for upload requests only in the access.log, but
download request not appeared.


        ##
        # Logging Settings
        ##

         log_format  main  '$remote_addr - $remote_user [$time_local]
"$request" '
                                      '$status $body_bytes_sent
"$http_referer" '
                                       'bytes_send="$bytes_sent"
content_length="$content_length" content_type="$content_type"
                                       request_body="$request_body" '
                                       'rt=$request_time
uct="$upstream_connect_time"  server_addr="$server_addr"
request_url="$request_uri"
                                       uht="$upstream_header_time"  urt="
$upstream_response_time" rqlength="$request_length"'
   
        access_log /var/log/nginx/access.log main;
        error_log /var/log/nginx/error.log;

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,281572,281631#msg-281631

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: download logging not captured in access.log

Maxim Dounin
Hello!

On Thu, Oct 18, 2018 at 08:12:00AM -0400, wld75 wrote:

> I have verified the nginx.conf and found no abnormality in logging section:
> please see below from the nginx.conf.
> i can see all requests for upload requests only in the access.log, but
> download request not appeared.

As previously suggested, you should check all logging settings in
nginx configuration, as logging can be disabled on a per-location
basis.  Try "nginx -T | grep access_log".

Also, it might be a good idea to make sure that requests you are
looking for are actually handled by the nginx server you are
looking at.  In particular, using tcpdump on the server to check
that requests are actually coming might be a good idea.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx