How to Disable Nginx Logs on Your Server

nginx disable access log

Nginx Web Server is one of the two most broadly utilized web servers on the planet. It has been rigid to his position from the past fifteen years as a perfect web server application.

Nginx is a web server that focuses on performance and low memory usage. It is as of now one of the fastest-growing web servers.

Nginx is known for its predominant exhibition, which is generally 2.5 times faster than its competitor  Apache. It is the best ideal for websites that handles a large number of static assets. yet can also be utilized for general-purpose or normal websites. It has outgrown its expected utilization quite a while back and is currently utilized for plenty of tasks like media streaming, reverses proxying, caching, etc.

About Nginx

Nginx web server is also commonly known as Engine X and it has diverse use in the recent web applications. It is so diverse that it can be helpful to power a wide range of web services like cloud computing, microservices, etc.


All you need to know about Nginx!

It is necessary for you to clear your basics about Nginx before you proceed further to the technical side. 

There are different variations of Nginx, one is paid and free version. But the most used version of Ngnix by developers is Open source Nginx server, it offers almost everything that a developer is looking for without any price.

Once you have installed Nginx, you can run sudo service Nginx start to initiate your server.

If you wish to learn how to install Nginx on your Ubuntu server, you can go through this tutorial.

WPOven offers FREE Premium themes & plugins, Business emails, SSD, SSL Certificate, Host Unlimited websites, Get dedicated servers, Offsite backups, Daily malware scanning & clean up.

With Plans Starting Just $16.61

Sometimes you might get a large number of warnings in your Nginx logs. These warnings might not be affecting your site but the sheer number of them might be increasing your total server disk usage, or if you just wish to turn off the nginx logs for any other reason, you can do so as follows :

Open the 'nginx.conf' file (usually located : /etc/nginx folder) or the Nginx config file for a particular site, for which you wish to turn off nginx logs (usually located in : /etc/nginx/sites-available folder).

Find the line :

error_log    /var/log/nginx/error.log;

Some people simply change the line to the following :

error_log    off;

Please note that this will not stop the nginx logs from being created on the server. This will just create the logs in : '/usr/share/nginx/off' file.

If you wish to turn off the Nginx error logs completely, you need to change the line to :

error_log   /dev/null   crit;

This will completely turn off the Nginx error logs on your server.

© 2024 WPOven Inc. All rights reserved. WPOven® and WordPress® are registered trademarks.
WPOven is the best Managed WordPress hosting for agencies and businesses that want to succeed. With Unlimited sites hosting option, its easy to use and manage, so you can focus on growing your business. 
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram