2012 in review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

The London Olympic Stadium is 53 meters high. This blog had about 740 visitors in 2012. If every visitor were a meter, this blog would be 14 times taller than the Olympic Stadium – not too shabby.

Click here to see the complete report.

Advertisements
Published in: on December 31, 2012 at 2:52 pm  Comments Off on 2012 in review  

2011 in review

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

A San Francisco cable car holds 60 people. This blog was viewed about 1,700 times in 2011. If it were a cable car, it would take about 28 trips to carry that many people.

Click here to see the complete report.

Published in: on January 1, 2012 at 10:42 am  Comments Off on 2011 in review  

Command to grep long sized log files using date format “from” and “to”

grep -r ‘Jul 6*’ maillog > bklog

awk ‘$0>=from&&$0<=to’ from=”Jul  6 20:00:02″ to=”Jul  7 00:00:02″ bklog > bklog5

Published in: on July 7, 2011 at 10:44 am  Comments Off on Command to grep long sized log files using date format “from” and “to”  

How to disable mod_security for an account

I’ve found that’s very useful and interested post from Mick Genie Blog’s about web hosting hot topics issues – mod_security. Sometimes, some applications will be need to disabled the mod_security applied to the virtual server in order to make their application works. You might wonder how to do on it?

Here with sharing with you all today.

If you are using Apache with mod_security, it could be done from the configuration file.However, you have to understand the Apache version and mod_security version that you used.

Normally, a hosted server will use Apache 1.x with mod_security 1.x and Apache 2.x with mod_security 2.x. To find out the Apache version, you may use the following command.

CODE:
1. $ httpd -v

With mod_security 1.x, you may use the following command from each of the virtual host path and add into the .htaccess file.

CODE:
1. ‹IfModule mod_security.c›
2. SecFilterEngine Off
3. SecFilterScanPOST Off
4. ‹/IfModule›

 

With mod_security 2.x, you could not add them to the .htaccess file, but you have to done it from the httpd.conf where they have improved the security and implementation.

If you using cPanel server, you will need to modify the httpd.conf file. Assume your Apache configuration located at /usr/local/apache/conf,

CODE:
1. vi /usr/local/apache/conf/httpd.conf

Search the virtual hosting such as mickgenie.com, uncommented(remove) the # from line as below.
Include “/usr/local/apache/conf/userdata/std/2/mickgenie/mickgenie.com/*.conf

Run the following command to create the mentioned path.

CODE:
1. mkdir -p /usr/local/apache/conf/userdata/std/2/username/domain_name/;cd /usr/local/apache/conf/userdata/std/2/username/domain_name/

Then you will need to create a file named bypass_modsec.conf and insert the command as below.

CODE:
1. ‹IfModule mod_security2.c›
2. SecRuleEngine Off
3. ‹/IfModule›

Save it and restart the Apache.

Published in: on April 2, 2011 at 5:57 pm  Comments Off on How to disable mod_security for an account  

Database Useful links

http://www.techotopia.com/index.php/MySQL_Essentials

http://www.linuxtopia.org/online_books/database_guides/mysql_5.1_database_reference_guide/index.html

Published in: on January 5, 2011 at 7:45 pm  Comments Off on Database Useful links  

Mail server virtualuserdb creating command for Postfix and Sendmail

makemap hash virtusertable.db < /etc/mail/virtusertable

Published in: on April 22, 2010 at 6:40 am  Comments Off on Mail server virtualuserdb creating command for Postfix and Sendmail