Posts Tagged ‘convention’

Linux: Howto Disable logging for all VirtualHosts on Apache and NGINX Webservers one liner

Wednesday, July 1st, 2020

Reading Time: 2minutes

Did you happen to administer Apache Webservers or NGINX webservers whose logs start to grow so rapidly that are flooding the disk too quickly?
Well this happens sometimes and it also happens that sometimes you just want to stop logging especially, to offload disk writting.

There is an easy way to disable logging for requests and errors (access_log and error_log usually residing under /var/log/httpd or /var/log/nginx ) for  all configured Virtual Domains with a short one liner, here is how.

Before you start  Create backup of /etc/apache2/sites-enabled / or /etc/nginx to be able to revert back to original config.

# cp -rpf /etc/apache2/sites-enabled/ ~/

# cp -rpf /etc/nginx/ ~/

1. Disable Logging for All  Virtual Domains configured for Apache Webserver

First lets print what the command will do to make sure we don't mess something

# find /home/hipo/sites-enabled/* -exec echo sed -i 's/#*[Cc]ustom[Ll]og/#CustomLog/g' {} \;

You will get some output like

find /home/hipo//sites-enabled/* -exec echo sed -i 's/#*[Cc]ustom[Ll]og/#CustomLog/g' {} \;

find /etc/apache2/sites-enabled/* -exec sed -i 's/#*[Cc]ustom[Ll]og/#CustomLog/g' {} \;
find /etc/apache2/sites-enabled/* -exec sed -i 's/#*[Ee]rror[Ll]og/#ErrorLog/g' {} \;

2. Disable Logging for All configured Virtual Domains for NGINX Webserver

find /etc/nginx/sites-enabled/* -exec sed -i 's/#*access_log/#access_log/g' {} \;
find /etc/nginx/sites-enabled/* -exec sed -i 's/#*error_log/#error_log/g' {} \;

f course above substituations that will comment out with '#' occurances from file configs of only default set access_log and error_log / access.log, error.log 
for machines where there is no certain convention on file naming and there are multiple domains in custom produced named log files this won't work.

This one liner was inspired from a friend's daily Martin Petrov. Martin blogged initially about this nice tip for those reading Cyrillic check out, so. Thanks Marto ! 🙂

Linux then and Now statistics diagram on GNU/Linux use grow 1994 – 2011

Tuesday, January 31st, 2012

Reading Time: 3minutes

Linux then and now developers line of code top 500 super computers and GNU / Linux 1994 - 2011, Kernel source code lines


In above graphics you see development of GNU/Linux through the years startingfrom 1992 to 2010.  You see for the past 18 years the number of kernel developers has rasised from 100 to 1000 (10 times). The number of super computers based on GNU / Linux operating system was only 1, while in 2011 they were already 413. Just for information Top 10 Super computers in terms of CPU power are running on top of some Linux + GNU environment based operating system.

Cell Phones baed on Linux or GNU sold worldwide, Internet users growth, PCs with linux shipped worldwide

You see the number of Patented software increased approximate 3 times for 16 years … PC shipped with Linux all oer the world increased almost 10 times.

GNU / Linux user habits then and now pie, Where Linux is used most survey results

A survey was run among the biggest Linux convention LinuxCon aiming to find out the share difference between users using different distros, as well as a survey to answer the question where is Linux mostly used. Obviously even though the Ubuntu desktop boom this years Linux is still mostly used in work location, home desktop / notebook users are almost 3 times less.
The survey show the sad results,  the Linux in school and academic communities is less used than for professional purposes. On the desktop things has slightly changed, for the last 5-7 years. From the position of being a Linux Desktop leading OS, Fedora went into the shadows in favour of  the "less free" (in terms of Freedom) Ubuntu.

Linux users then and now, biggest successes and challenges for Linux and free software use and adoption

All system administrators knows well Linux is a very common choice for building small or middle enterprise business information systems. Hugest platforms which are the web backbone today like Google, Facebook, Twitter, Stock Exchanges,  Mail services, various technical equipment etc. runs on top of Linux. Even though the huge number of adoption Linux and free software is though to not be legally assured this is well known among free software and open source evangelist under the term FUD.

Android found its way also in Samsung Galaxy and a number of tablet devices running Linux based kernel OS was shipped in 2011.

With the raise of Android which (base is mostly Linux kernel and less GNU tools based). The spread of Linux has seen a huge raise on the mobile (smart phones) market as well. You see in above chart as of 2011 Android sells had the highest market share  with 37%.
The year 2011 was not among the best Linux users anywas, as Unity does turned away many users to become Linux converts. The big GNOME 3 mess, which was called by Linus Toravlds a "holy mess" , along with the's security break in does also contributed that year 2011 ended up as a bad one for free software.

Linux, Windows 7, Vista, XP, MacOS X, iOS market share chart

As of August 2011, the global Linux market approximate market share is about 3% of all the installed OSes currently existing in the world. And compared to 5 years ago there is a little decline in the share. I believe the 2012 will be a better year for both development and adoption of free software and Linux.