Welcome! Log In Create A New Profile

Advanced

Re: Empty error log

January 08, 2014 04:34AM
--- Original message ---
From: "chAlx" <chalx.chalx@gmail.com>
Date: 8 January 2014, 11:08:35



> I have installed Nginx for a small web server with static content. It works fine but the site error log file is always empty. All errors such as 404 are written to the access log only. File grants are the same for access and error logs.
>
> I've tried to change error_log param from "error" to "warn" and that didn't help. But changing it to "debug" was successful: log was filled with debug info (but no error info).
>
> My config files:
>
>
> /etc/nginx/nginx.conf:
>
> user www;
> worker_processes 2;
> pid /var/run/nginx.pid;
>
> events {
> worker_connections 768;
> }
>
> http {
> sendfile on;
> tcp_nopush on;
> tcp_nodelay on;
> keepalive_timeout 65;
> types_hash_max_size 2048;
> server_tokens off;
> include /etc/nginx/mime.types;
> default_type application/octet-stream;
> access_log /var/log/nginx/access.log;
> error_log /var/log/nginx/error.log;
> gzip on;
> gzip_disable "msie6";
> gzip_min_length 200;
> gzip_types text/plain text/css application/json
> application/x-javascript text/xml application/xml application/xml+rss
> text/javascript application/rdf+xml;
>
> include/etc/nginx/conf.d/*.conf; # None
> include/etc/nginx/sites-enabled/*; # One
> }
>
>
> /etc/nginx/sites-available/mysite.conf:
>
> server {
> listen 80;
> root /var/www/mysite;
> index index.html index.htm;
> server_name mysite.org;
> access_log /var/log/nginx/mysite_access.log combined;
> error_log /var/log/nginx/mysite_error.log error;
> log_subrequest on;
> location / {
> try_files $uri $uri/ =404;
> autoindex off;
> }

Use try_files if you need rewriting rules.

E.g. http://myshop.com/goods/foo/bar need to be rewritten in /index.php?router=goods/foo/bar and passed to php-server.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Empty error log

chAlx January 08, 2014 04:10AM

Re: Empty error log

Valentin V. Bartenev January 08, 2014 04:20AM

Re: Empty error log

artem January 08, 2014 04:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 288
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