-1
votes
0answers
18 views

Is there a way to recover lost logs in Nginx? [duplicate]

I have a fedora based server with nginx installed on it. I was taking logs and using logrotate, rotating them on a daily basis. Here's the configuration /etc/logrotate.d/nginx: /var/log/nginx/*log { ...
1
vote
1answer
33 views

Show real server name in nginx logs and params passed to fastcgi?

I have configured my nginx vhosts with a regex in server_name. nginx shows the raw regex in logs and in params passed to php-fpm (I know there's $_SERVER['HTTP_HOST'] with a real value, that's not an ...
1
vote
0answers
31 views

Where does cPanel, Apache, or Nginx log php script access?

Synopsis Earlier today a website went down due to some database issues. After some investigation I found out that some tables were missing data. In order for me to rule out "accidental deletion" by ...
0
votes
0answers
15 views

Adding extra header using middleware module in django

I was trying to log the user-name in the nginx logs. As I am not doing basic http authentication, adding $remote_user in log_format doesn't work. I will need my application to tell Nginx what the ...
4
votes
1answer
39 views

Storing username in nginx logs

Is there a way in which user-name or user-id can be stored in nginx logs. I tried inserting $remote_user in the log_format directive but it doesn't seem to work.
0
votes
1answer
41 views

General webserver log and custom logs where to gather them

I am not trying to create an opinionated question here though it might sound like it. My problem is as follows. I have the normal apache2 access and error log on a bunch of servers. I also have ...
1
vote
1answer
64 views

Access log of nginx: why are foreign URLs logged?

My access log is full of such entries: 178.207.40.219 - - [03/Apr/2014:17:34:37 +0200] "GET http://win.mail.ru/cgi-bin/auth?Login=nutyck@bk.ru&Domain=mail.ru&Password=241716 HTTP/1.1" 403 168 ...
0
votes
1answer
285 views

make nginx not log “no user/password was provided for basic authentication” in error logs

I've added password protection to a lot of my domain via nginx by adding: auth_basic "Restricted"; auth_basic_user_file /usr/ssl/htpasswd; to the nginx vhosts. I log all errors ...
1
vote
3answers
190 views

Parseable NGINX accesslog files with delimiters

The default NGINX format is this: log_format combined '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" ...
0
votes
0answers
33 views

Rsyslog with Nginx virtual hosts

I have an Nginx server with several virtual hosts, each of them generating log files. I'm sending all these logs to a remote server but don't know how to create one log file per virtual on this ...
0
votes
2answers
39 views

Excluding clients from web logs?

Is it possible to exclude certain IP addresses from Nginx's access.log, for example where lots of the requests come from a monitoring server?
4
votes
1answer
322 views

Why my nginx server receives requests targeting ads.yahoo.com?

I have a nginx proxy facing public internet. A few days ago, I started to receive a torrential amount of requests, targeting URLs that are invalid for my domain. An excerpt from nginx access.log: ...
1
vote
1answer
101 views

Buffered nginx/varnish access logging to remote server

I need a way to measure how many times different files have been accessed and when. My setup consists of several low capacity servers spread out over the world running Varnish behind Nginx (for SSL ...
0
votes
0answers
20 views

nginx: access_log both compressed and uncompressed

In my "vhost" declaration I have: access_log /WEBSITE_DIR/logs/access.log.gz combined gzip; Problem is I get 2 files, an access.log.gz and an access.log Why? I want just the .log.gz one..
0
votes
1answer
136 views

A good tool for parsing Nginx logs for Django app [closed]

Can anyone recommend a good tool to parse and analyze Nginx access logs which will group the urls based on the regex in my django urls.py files (or a config file generated from them)? It does not ...
1
vote
1answer
259 views

Logging client ip address from tcp connection from HAproxy to nginx

If internet traffic comes through an HAproxy load balancer on SSL and that is passed to an nginx web server, how can I log the clients ip address? I'm aware of methods like this: How can I use ...
0
votes
0answers
96 views

Nginx is logging $remote_user for GET but not for PUT, POST

nginx logs are showing the Basic Auth remote user for all GET requests, but only a "-" is shown for PUT and POST requests that are also using Basic Auth. I am using nginx/1.4.1 on Ubuntu 12.04.2 LTS. ...
1
vote
0answers
217 views

Most efficient way to pipe web beacon logs to Apache Flume?

The Setup I've setup a simple Nginx server that logs (in a JSON) format, which is then piped to an S3 bucket with Apache Flume. All the Nginx server does is respond with a web beacon tracking pixel ...
0
votes
1answer
234 views

How does nginx handle log file growth by default?

I'm a bit worried because its been a couple of days and my access log file is up to 250MB+. Does it roll log files over and delete them? I'd like for there only to be 1GB or less of log files total.
1
vote
1answer
35 views

Nginx keeps logging on main access_log

I have setup nginx in my server as a reverse proxy to haproxy. I have configured my own log_format and assigned it to every virtual host I have. However I have not turned off main access_log in ...
1
vote
2answers
139 views

Nginx error log is 96GB in size

Today my server was unresponsive to HTTP requests and it looks like the cause was that nginx went down because when I restarted nginx, it worked again. I wanted to take a look in the error log to see ...
0
votes
2answers
263 views

separate logs from limit_req_zone in nginx

Here we have piece of current nginx configuration: limit_req_zone $binary_remote_addr zone=one:32m rate=2r/s; limit_req zone=one burst=10; error_page 500 501 502 503 504 =503 /offline.html; location ...
1
vote
1answer
357 views

nginx don't log requests of a specific ip adress

I'm trying to don't log requests made from a specific ip address like this: location = / { index index.php; if ( $remote_addr = "spe.ci.fic.ip" ) { access_log off; } } But ...
0
votes
1answer
76 views

access_log off for a 301 or a 302

I am using haproxy and nginx. Haproxy has sthis option to check health of my backends: option httpchk HEAD /lol.txt HTTP/1.0 All works fine, but I do not want to log this health check So in my ...
0
votes
2answers
387 views

nginx with real_ip — log both client remote_addr and proxies address

I have an nginx instance set up behind multiple load balancing proxies, and I am using real_ip to get the clients IP address in remote_addr for processing by my Python application. However in my logs ...
0
votes
1answer
33 views

aegir nginx logging

I'm a developer rather than a sysadmin by trade. I'm working on a drupal site that's been installed with aegir which is clearly dying part-way through loading several drupal pages. I reckon there's a ...
0
votes
2answers
111 views

How to concat rotated logs back together

How to concatenate the rotated logs back together to make the original file? huali-access.log huali-access.log.15 huali-access.log.21 huali-access.log.28 huali-access.log.34 ...
0
votes
1answer
186 views

Empty Access_logs

nging vhost file: nginx works as a reverse proxy cat /etc/vhosts/website.info server { error_log /var/log/nginx/vhost-error_log warn; listen 1.2.3.4:80; server_name ...
0
votes
1answer
144 views

how to add links to view nginx error logs from within virtualmin?

i was wondering this, then found someone else wondering it too (at that stage with no reply) https://www.virtualmin.com/node/24417 when you switch from apache to nginx you dont get the same option ...
2
votes
1answer
257 views

Nginx access log shows authenticated user “admin”

I came across a line in my Nginx access log: 218.201.121.99 - admin [12/Dec/2012:18:33:18 +0800] "GET /manager/html HTTP/1.1" 444 0 "-" "-" Let me stress that there is only 1 record with this IP. ...
0
votes
1answer
490 views

piping nginx and php-fpm logs to MySQL

I got a number of nginx + php-fpm application servers running under LB. I would like to centralize the logs into external mysql database. I was wondering if there is a way of achieving this ? I ...
3
votes
1answer
991 views

Logging the client IP with Nginx/Varnish/Apache

I have Nginx listening on port 443 as an SSL terminator, and proxying unencrypted traffic to Varnish on the same server. Varnish 3 is handling this traffic, and traffic coming in directly on port 80. ...
2
votes
1answer
438 views

php5.4 + freebsd8.3+nginx can't get errors

I have a confusing behaviour. I can't get any error into log file or screen. I made a file index.php with content like this: "<?php a();".Normally, I will get message like this: "Call to ...
-1
votes
1answer
46 views

nginx 404 logs to all virtualhosting logs

I am using nginx and i have two sites running: site1 = /1/access.log site2 = /2/access.log when a user get 404 images not found on site2 nginx writes to access.log of site1 & site2 reporting the ...
1
vote
1answer
493 views

NGINX : Proxy pass intercepting 5xx errors - Possible to differentiate between ones fired by backed vs ones fired by nginx itself?

We use proxy_intercept_errors ( http://wiki.nginx.org/HttpProxyModule#proxy_intercept_errors ) with our backends. We intercept a number of status codes, including a few 5xx ones. Our 5xx (each 500 ...
4
votes
1answer
2k views

How to limit nginx access log file size and compress?

I'm hoping to get some direction on how to set up truncating and gzip'ing on my domains' access logs. I notice that the core nginx access logs get split and compressed by default, yet my individual ...
0
votes
1answer
312 views

php-fpm error logging with nginx

I have nginx+php-fpm on a server and the messages get truncated at 2048 chars, rendering the message quite unhelpful when a stack trace is logged : I can't see the following fields anymore: host ...
3
votes
2answers
245 views

Mod_security Logging

Im trying to run mod_security as standalone service with nginx as reverse proxy everything works fine except logging. Mod_security logs reverse proxys ip addres instead of clients ip address. I would ...
0
votes
2answers
1k views

how change nginx temp & log folder or disable logging completely

I'm running nginx 1.3.5 under windows seven, I need to execute nginx directly from a read-only media (CD or DVD), but when I want to run it, it fails with this error: nginx: [alert] could not open ...
1
vote
2answers
251 views

nginx - log access and error to pipe and use multilog to log rotate

What I am trying to do: Log rotate nginx access and error log using multilog My approach: Log nginx access and error to a pipe, so I can have another process that runs multilog that reads from that ...
5
votes
1answer
2k views

How to block Nginx access log statements from specific user agents

I am looking to turn off logging in the Nginx access log file from specific requests from http user agents. Basically from the Amazon ELB Health Check and our external (Pingdom) monitoring. Since ...
1
vote
2answers
2k views

Remote logging - Nginx over Rsyslog or any other alternative

I need to setup centralized remote access logging of Auto Scaling Instances. Currently I have Rsyslog / Apache2 logging working just fine, but for the new project Nginx is used and I don't see any ...
1
vote
3answers
2k views

How to determine which request nginx sends to a proxy and which it serves?

I currently have nginx proxying for Thin, but set up to serve static files for the app that Thin is serving instead of proxying the request. What I'd like to know is how I can check that the rules ...
2
votes
2answers
3k views

Separate Nginx access log file for certain requests only

As far as I can see Nginx supports by default 2 log files: error_log (tracks issues related to the Nginx server itself) and access_log (tracks requests processed by Nginx). Whilst it is possible to ...
2
votes
1answer
4k views

How to configure php-fpm to log logs to log files configured in nginx virtualhosts

I have Fedora 16 with nginx and php-fpm. Everything is working very good. All logs with php notice,warnig error etc. are in /var/log/php-fpm/www-error.log. Is there a way to configure php-fpm to write ...
3
votes
1answer
576 views

Log response body in nginx

How do you log the response body (not request body) in nginx? I could not find such a variable in any of the modules (only the request body). We are using nginx as a reverse proxy/loadbalancer and ...
0
votes
1answer
541 views

How to remote log with Nginx

Have anybody experience on remote access and error logging of Nginx? We have such setup for Apache, but would like to migrate to Nginx.
3
votes
1answer
241 views

Use Nginx callback after x-accel-redirect response (or use logging to socket)

my workflow is following: accept request with ruby script do some stuff send x-accel-redirect header and return ... client receives data ... client disconnected <- here I would like to run some ...
1
vote
3answers
540 views

How do I keep the download count of a url in Nginx?

More precisely can I configure Nginx to output the log entry to a separate log file whenever a particular url is requested? Later the number of lines in that log can give me the download count. ...
1
vote
1answer
583 views

Nginx logging “_” instead of domain name

I setup Nginx to server multiple websites from a single virtual host by doing this (A Default Catchall Virtual Host): server { listen 80 default; server_name _; However, my access logs ...