0

I am getting the locomotive, I have stopped working the logs, I have created them again, I have the subdomains with the logs turned on, I checked the configuration up and down nginx and it does not work, only a registry works that created a post error.log in /var/log/nginx and that is updated when you start nginx, the rest of logs are created as I have them configured in site-avalible, but they are blank

An example of the created logs:

-rw-r----- 1 www-data adm 0 May 26 10:42 blog_access.log

-rw-r----- 1 www-data adm 0 May 26 10:42 blog_error.log

This is the only one that works:

-rw-r----- 1 www-data adm 14591 May 26 12:40 error.log

It compiles when nginx is installed:

--http-log-path=/var/log/nginx/access.log

--error-log-path=/var/log/nginx/error.log

I do not understand why taking the rest of logs with the same permissions and owners that error.log does not work?

  • Have you tried remove log files and restart nginx? – Alexander Tolkachev May 29 '17 at 8:44
  • I had moved the old logs to another location and mysteriously continue to update, even if they are no longer in the path specified in the subdomain configuration file. This is a ghost thing! – Isaac Palacio May 29 '17 at 9:37
  • If you don't restart/reload nginx after moving log files, nginx will still use the old file handle of the log file. When you move a file to another directory, only the directory entries are changed, not the actual file handle. Therefore nginx keeps writing to the same file, which is simply in different location. – Tero Kilkanen May 29 '17 at 12:10
  • @TeroKilkanen yes, but I service nginx restart when I make some changes, now delete all the logs, but the new ones that are generated, are empty. – Isaac Palacio May 29 '17 at 12:20
  • Please show your complete nginx configuration in the question. – Tero Kilkanen May 29 '17 at 14:18
-1

Restarting the server was solved

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.