Welcome! Log In Create A New Profile

Advanced

NGINX As a log for massive requests

Posted by guytamir1 
NGINX As a log for massive requests
July 07, 2013 10:31AM
Hi all,
i'm very new to NGINX.
I have a site and i want to count each time a user enters it.
Instead of keeping a counter on my site's server that will go up each time i serve a page i want to send add to my site a JS code that posts to a new server with nginx, sending the server a parameter.
The new server (the one with NGINX) will write to a constant file (each time a post is made to him) a line with the time and the parameter sent in the request.
I'll create a script that runs over the file and counts each entrance..

Since i'm getting massive traffic a friends told me that NGINX is suited best for my need, how can i use it in the best way?

Regards,
Guy
Re: NGINX As a log for massive requests
July 18, 2013 07:58PM
If I'm understanding you correctly, would the nginx access log be suffice?
The only issue I see is that if you're sending the parameter in the POST body, it won't be logged by nginx.
If it's possible to sent it in a GET parameter, it would be logged.

(I'm presuming the "massive" in your topic title refers to the amount of traffic rather than the amount of data that needs to be logged per request)



Edited 1 time(s). Last edit at 07/18/2013 08:01PM by Yumi.
Re: NGINX As a log for massive requests
July 24, 2013 11:07AM
Hi,

thanks for the reply.

you assumed correct, after reading the documentation some more i saw the access log.. i'm sending the needed data via headers and then i can log them quite easily..

Best..
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 297
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready