LinuxEasy

Nice Command

Linux nice command is Run Process With Modified Scheduling Priority ( nicenesses ). With the help of Nice command in Linux you can set process priority. If you give a process a higher priority, then Kernel will allocate more cpu time to that process.

By default when a programe is launched in Linux, it gets launched with the priority of ’0′. However you can change the priority of your programes by either of the following methods.

You can launch a programe with your required priority. Or you can also change the priority of an already running process.

Process priority values range from -20 to 19. A process with the nice value of -20 is considered to be on top of the priority. And a process with nice value of 19 is considered to be low on the priority list.

You can use ps -al, top and various…

View original post 308 more words

Google Page Speed is an Apache module (mod_pagespeed) created by Google to reduce page load time. It automatically speeds up your site by applying optimizations to your pages, CSS, JavaScript, images and other content.

How does Google PageSpeed work?

The mod_pagespeed Apache module, developed by Google allows using multiple site speed optimizations like combining and minifying JavaScript and CSS files, inlining small resources, dynamically optimization of images by removing unused meta-data from each file, resizing the images to specified dimensions, and re-encoding images to be served in the most efficient format available to the user. When mod_pagespeed is enabled it come with a pre-defined set of core optimization filters. In addition, you can add more advanced filters for higher performance improvements.

How to enable Google PageSpeed?

You can enable Google PageSpeed from the SuperCacher tool in your cPanel. There, you need to turn the module on, from the Google PageSpeed tab:

Next, switch PageSpeed on by clicking on the button next to the desired domain name:

Important!Currently PageSpeed cannot be used together with the Static and/or the Dynamic cache options. If you switch PageSpeed on, we will automatically switch off any other caching option that is currently active but is not compatible.

How to flush Google PageSpeed cache?

Regular hosting companies allow you only one way of flushing the PageSpeed cache – through console for the entire server. We at SiteGround, however, have developed a special technique that provide you with an easy and flexible method for clearing your cache. You can either clear the master cache for your entire account, or you can clear it on per domain basis.

Advanced Google PageSpeed configuration

To access the advanced PageSpeed configuration, press the Advanced button next to a domain name that you’ve activated the service for.

A pop-up will appear with few lines in it. Those are the currently active PageSpeed rules.

By default, you will have four rules added:

  • ModPagespeed On – this line starts the PageSpeed module
  • ModPagespeedDomain yourdomain.com – this line defines your domain
  • ModPagespeedEnableFilters extend_cache – this is a complex rule that enables three different optimizations:
    • CSS Optimization
    • Images Optimization
    • JavaScript Optimization
  • ModPagespeedFileCachePath /home/user/.pagespeed_cache/yourdomain.com – the path to the PageSpeed cache file

Google PageSpeed has more than 40 different optimization filters. For detailed information on each one of them, please visit the official Google documentation page.

Important: note that each time you disable Google PageSpeed, all your custom filters will be reset. Do not forget that if you switch on Static or Dynamic cache, Google PageSpeed will be disabled automatically, and all custom settings will be lost. We recommend that you keep a copy of any custom optimization filters you want to use.

Optimise your Site’s Speed Automatically with mod_pagespeed for Apache

Google are always looking at ways to make the web faster and have now introduced something called mod_pagespeed.

Mod_pagespeed is an open-source Apache module that automatically optimises websites speed. It includes several filters that optimise Javascript, HTML and CSS. According to Google, they have seen mod_pagespeed reduced the page load times up to 50%. Meaning, it can speed up websites 2x or even much faster.

This is good news for webmasters and web developers. With mod_pagespeed they can now further improve the performance of their websites running with Apache HTTP Server.

To read more of the update, visit Google Webmaster Central Blog.

Affection Code

The last few days I have been comparing Nginx to HAProxy, with surprising results.

First, a bit of background. For a long time we at Bengler have been using Nginx as the main web server for our projects (12), as well as to proxy Rails running under Mongrel. Nginx is a superb little open-source web server with a small footprint, sensible configuration language, modern feature set and buckets of speed. However, we quickly realized that the load balancing features of the proxy are not up to scratch.

The core problem is the proxy load balancing algorithm. Nginx only comes with a round-robin balancer and a hash-based balancer. Only the former is of interest to us since our object is to distribute the load evenly across a pack of Mongrel back ends. The round-robin algorithm is often an acceptable tool: if every request finishes within a few milliseconds, there’s no problem.

But…

View original post 973 more words

ConfigServer provide a range of paid and free applications, including a significantly more advanced firewall, that plug directly into WHM on your cPanel server. These applications are highly recommended for anyone who is serious about the security of their cPanel Server, as they not only provide enhanced security functionality, but also allow you to easily manage a number of other basic cPanel functions, such as mail settings, mail queues, and a more advanced ModSecurity tool.

Below is a list of the free applications that we will be providing the simple installation instructions for:

  1. CSF – this is an advanced firewall system utilising Linux ip tables
  2. Mail Manage – allows you to adjust mail settings, such as hourly limits and email forwarders, on a per account basis
  3. Mail Queues – easily manage your email queues with the ability to force run the queue and delete stuck messages
  4. ModSecurity Control – if you have installed ModSecurity on your cPanel Server, this provide an advanced management interface
  5. Explorer – This is a file system explorer web interface which allows you to also run basic shell commands within folders – WARNING: While this utility can be very useful it is also very dangerous indeed. You can easily render your server inoperable and unrecoverable by performing ill advised actions. No warranty or guarantee is provided with the product that protects against system damage.
NOTE: All of the installations below require you to be logged into SSH as root.

Install ConfigServer Security & Firewall

rm -fv csf.tgz
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

Remove installation files:

cd ..
rm -Rfv csf/ csf.tgz

Install ConfigServer Mail Manage

rm -fv cmm.tgz
wget http://www.configserver.com/free/cmm.tgz
tar -xzf cmm.tgz
cd cmm
sh install.sh

Remove installation files:

cd ..
rm -Rfv cmm/ cmm.tgz

To uninstall:

rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/addon_cmm.cgi
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/cmmversion.txt
rm -Rfv /usr/local/cpanel/whostmgr/docroot/cgi/cmm/

Install ConfigServer Mail Queues

rm -fv cmq.tgz
wget http://www.configserver.com/free/cmq.tgz
tar -xzf cmq.tgz
cd cmq
sh install.sh

Remove installation files:

cd ..
rm -Rfv cmq/ cmq.tgz

To uninstall:

rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/addon_cmq.cgi
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/cmqversion.txt
rm -Rfv /usr/local/cpanel/whostmgr/docroot/cgi/cmq/

Install ConfigServer ModSecurity Control

rm -fv cmc.tgz
wget http://www.configserver.com/free/cmc.tgz
tar -xzf cmc.tgz
cd cmc
sh install.sh

Remove installation files:

cd ..
rm -Rfv cmc/ cmc.tgz

To uninstall:

rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/addon_cmc.cgi
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/cmcversion.txt
rm -Rfv /usr/local/cpanel/whostmgr/docroot/cgi/cmc/

Install ConfigServer Explorer

rm -fv cse.tgz
wget http://www.configserver.com/free/cse.tgz
tar -xzf cse.tgz
cd cse
sh install.sh

Remove installation files:

cd ..
rm -Rfv cse/ cse.tgz

To uninstall:

rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/addon_cse.cgi
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/cseversion.txt

If you run into any issue with the install, just head over to the ConfigServer forums and you’ll find plenty of people who can assist you.

We need to edit the parameter ‘anon_mkdir_write_enable’ and set it’s value to ‘YES’. But in order to make the parameter working, ‘write_enable’ must be activated. The default is NO.

# Uncomment this to enable any form of FTP write command.
write_enable=YES

# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES

Yes! It is possible to allow anonymous users to use secured SSL connections. The value of parameter ‘allow_anon_ssl’ should be ‘YES’ in the vsftpd.conf file. If it, set to NO it wont allow anonymous users to use SSL connections. The default value is NO.

# Add this line to enable secured SSL connection to anonymous users.
allow_anon_ssl=YES

Block IP using host.deny file

Open ‘/etc/hosts.deny’ file.

# vi /etc/hosts.deny

Append the following line at the bottom of the file with the IP address that you want to block access to FTP.

#
# hosts.deny    This file contains access rules which are used to
#               deny connections to network services that either use
#               the tcp_wrappers library or that have been
#               started through a tcp_wrappers-enabled xinetd.
#
#               The rules in this file can also be set up in
#               /etc/hosts.allow with a 'deny' option instead.
#
#               See 'man 5 hosts_options' and 'man 5 hosts_access'
#               for information on rule syntax.
#               See 'man tcpd' for information on tcp_wrappers
#
vsftpd:198.28.0.0

Block IP using iptables rule

To block FTP access to particular IP address, add the following drop rule to iptables INPUT chain.

iptables -A RH-Firewall-1-INPUT -p tcp -s 172.16.16.1 -m state --state NEW -m tcp --dport 21 -j DROP

* addns – add a dns zone
* addfpmail – Add frontpage mail extensions to all domains without them
* addfpmail2 -Add frontpage mail extensions to all domains without them
* addnetmaskips – Add the netmask 255.255.255.0 to all IPs that have no netmask
* addnobodygrp – Adds the gorup nobody and activates security
* addpop – add a pop account
* addservlets – Add JSP support to an account (requires tomcat)
* addstatus – (Internal use never called by user)
* adduser – Add a user to the system
* bandwidth – (OLD)
* betaexim – Installs the latest version of exim
* biglogcheck – looks for logs nearing 2 gigabytes in size
* bsdcryptoinstall – Installs crypto on FreeBSD
* bsdldconfig – Configures the proper lib directories in FreeBSD
* bsdpkgpingtest – Tests the connection speed for downloading FreeBSD packages
* buildbsdexpect – Install expect on FreeBSD
* builddomainaddr – (OLD)
* buildeximconf – Rebuilds exim.conf
* buildpostgrebsd-dev – Installs postgresql on FreeBSD.
* chcpass – change cpanel passwords
* easyapache – recompile/upgrade apache and/or php
* exim4 – reinstall exim and fix permissions
* fixcommonproblems – fixes most common problems
* fixfrontpageperm – fixes permission issues with Front Page
* fixmailman – fixes common mailman issues
* fixnamed – fixes common named issues
* fixndc – fixes rndc errors with named
* fixquotas – fixes quota problems
* fullhordereset – resets horde database to a fresh one – all previous user data are lost
* initquotas – initializes quotas
* installzendopt – installs zend optimizer
* killacct – terminate an account – make sure you take a backup of the account first
* mailperm – fixes permission problems with inboxes
* park – to park a domain
* pkgacct – used to backup an account
* restartsrv – restart script for services
* restorepkg – restores an account from a backup file ( pkgacct file)
* runlogsnow – update logs of all users
* runweblogs – update stats for a particular user
* securetmp – secures /tmp partition with options nosuexec and nosuid
* suspendacct – suspends an account
* unsuspendacct – unsuspends a suspended account
* upcp – updates cpanel to the latest version
* updatenow – updates the cpanel scripts
* updateuserdomains – updates userdomain entries

If mod_sec is causing problem in proper functioning of web site then we will need to disable it by placing few statements into your .htaccesss . Statement vary depending on your Apache version.

First we need to check apache version installed on your server by running below command:

root@linux [~]# httpd -v
OR
root@linux [~]# /usr/local/apache/bin/httpd -v

If you have Apache 1.x then create .htaccess file into your document root and place following statements.

SecFilterEngine Off
SecFilterScanPOST Off

If you have Apache 2.x then place following statements.

SecRuleEngine Off
SecAuditEngine Off

Note : False Or Spam reviews will be deleted, all reviews are cross checked.