Score:0

Nginx, exclude specific URLs for access logs

ar flag

In the access log of my nginx web server I have logs like this:

XX.XX.147.5 - - [20/Oct/2022:18:42:59 +0000] "GET /my-subfolder/readiness HTTP/1.1" 200 1496 "-" "EF-Strati-HealthCheck-Client/1.0" "11.16.133.0"
XX.XX.94.5 - - [20/Oct/2022:18:42:59 +0000] "POST /my-subfolder/some-path-to-exclude/socket.io/?EIO=4&transport=polling&t=OFsjAj9&sid=2Mufsq23xBh8FRLWAFtD HTTP/1.1" 200 2 "https://www.myapp-example.com/my-subfolder/home" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" "161.165.148.42, 23.205.100.169, 10.74.133.61,11.16.53.0"

How can I make a rule to exclude logs a access that has /socket.io/ in?

Is there a way to put some regex? Like:

location ~ ^/socket.io/(.*)$ {
  access_log off;
}
Ginnungagap avatar
gu flag
Have you tried the solution you propose? What was the outcome, what did you expect?
Lex Li avatar
vn flag
https://serverfault.com/questions/874144/how-to-turn-off-access-log-for-only-a-certain-url-in-this-nginx-configuration
pmiranda avatar
ar flag
@Ginnungagap yes, I tried that an other regex, without success
Score:0
gu flag

enter image description here

did you try localstroge.debug="*"? website:enter link description here

pmiranda avatar
ar flag
I dont get your answer
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.