Understanding access log columns in Nginx
The NGINX logs the activities of all the visitors to your site in the access logs. Here you can find which files are accessed, how NGINX responded to a request, what browser a client is using, IP address of clients and more. It is possible to use the information from the access log to analyze the traffic to find sites usages over time.
By default, the format of the access log columns is the following:
log_format combined '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
As you can see the columns represent the following values in order:
$remote_addr- Address of the client
$remote_user [$time_local]- Information about user and local time of the client
$request- Request that has been sent by the client (GET,POST,PUT …)
$status- HTTP status code
$body_bytes_sent- The size of the body of the request in bytes
$http_referer- Address of the HTTP referer
$http_user_agent- User Agent of the client
Make your mark
Join the writer's program
Are you a developer and love writing and sharing your knowledge with the world? Join our guest writing program and get paid for writing amazing technical guides. We'll get them to the right readers that will appreciate them.Write for us
Build on top of Better Stack
Write a script, app or project on top of Better Stack and share it with the world. Make a public repository and share it with us at our email@example.com
or submit a pull request and help us build better products for everyone.
See the full list of amazing projects on github