Articles
Another important function of SSH is allowing secure file transfer using SCP and SFTP....
Argument list too long error for rm, cp, mv commandsThe reason this occurs is because bash actually expands the asterisk to every matching file,...
Basic memcache securitySince most clients are not aware of the security risk that memcache represents, there is one...
Can I change root's email address or forward it to an external address?Simply create /root/.forward and place your email address in this file. It will be forwarded to...
Changing the SSH Port for Your Linux ServerTo Change the SSH Port for Your Linux Server Connect to your server via SSH (more info)....
Check 301 http response with curlYou can dump the headers of the response with the -D option: curl -s -D - http://www.example.com...
Check Which Folders Use The Highest Disk Space In LinuxCommand du -h <dir> 2>/dev/null | grep '[0-9\.]\+G' Replace <dir> with your...
DNS Resolution with resolv.confHow do I edit the “/etc/resolv.conf” file?Use text editor such as vi or gedit from Linux...
Exim Remove All messages From the Mail QueueTo remove all the message from exim queue # exim -bp | exiqgrep -i | xargs exim -Mrm To...
Find & Grepfind . -name '*.py' -print0 | xargs -0 grep 'something' > output.txt
Force www in .htaccessMany customers at some point request to either force www or non-www version of their site to...
Formats for /etc/mailhelo and /etc/mailipsYou may use any command-line text editor such as vi (or vim), nano (or pico), to edit the files....
How To Harden The Security Of /tmp Directory?Users must take the following measures for hardening the /tmp directoryA. Creating /tmp as a...
How To Install CSF FirewallInstallation is quite straightforward: cd /usr/src/ rm -fv csf.tgz wget...
How To Install MariaDB on CentOS 6MariaDB is a drop-in replacement for MySQL. It is easy to install, offers many speed and...
How To Install Varnish 4 on CentOS 7Varnish is a proxy and cache, or HTTP accelerator, designed to improve performance for busy,...
How To: Automate Server Scripts With CronServers can automatically perform tasks that you would otherwise have to perform yourself, such...
How To: Back Up MySQL Databases From The Command LineWhile automated backups are important, sometimes you just want to take a quick and dirty snapshot...
How do I display all URLs in a redirect chain?SImply use wget with grep. Example: $ wget http://picasaweb.google.com 2>&1 | grep...
How do I set path for open_basedir with php.ini?To edit the open_basedir paths, open php.ini and add your directories using this format:...
How do I switch my DNS resolvers away from Google?Recently many users have had issues with Google's DNS resolution, which have really highlighted...
How to Check CentOS VersionThe easiest way to check your CentOS version is via the command line. Login to your CentOS...
How to Delete Files Older than 30 days in LinuxThis is the best practice to remove old unused files from your server. For example, if we are...
How to Delete matching files in all subdirectoriesRemove all *.swp files underneath the current directory, use the find command in one of the...
How to Display (List) All Jobs in Cron / CrontabView Root’s Cron Jobs crontab -l View a User’s Cron Jobs crontab -u username -l Example with...
How to Install ImunifyAV on Cpanel Serveryou can use the following command, which works on Cpanel, Plesk, and DirectAdmin server wget...
How to List Which Apache 2 Modules are Enabled on Fedora 21The Apache web server is one of the most popular and powerful web servers in the world due to its...
How to Modify the "max_connections" Value in MySQLTo make these changes permanent you need to add the following line to your main MySQL...
How to Restart OpenVPNThe exact method you use will depend on your OS, and whether you start as a service or not.Centos...
How to automate SSH login?Don't use a password. Generate a passphraseless SSH key and push it to your VM. If you already...
How to backup MySQL database on a remote server?When you have access only to MySQL database existing on a remote server and not SSH or FTP - this...
How to check listening ports with netstatCheck ports To list the TCP ports that are being listened on, and the name of each listener’s...
How to check os version in Linux command lineCheck os version in Linux The procedure to find os name and version on Linux: Open the...
How to clear swap memory in LinuxTo clear the swap memory on your system, you simply need to cycle off the swap. This moves all...
How to disable entity tags (ETags)DISABLING ETAGS To disable sending entity tags in the HTTP headers, add the following two lines...
How to enable Nginx as reverse proxy in Plesk 12Tested Environment: Centos 7Plesk Version: 12 Overview: Apache with Nginx Nginx, a...
How to find sending spam emails and enable mail header in php.ini- In Linux servers if there are a lot of emails in the queue "over 100" emails. you can check if...
How to find the public IP address from command lineHere is how to find the public IP address from command line. You first need to install curl as...
How to redirect HTTP traffic to HTTPS using an .htaccessThe below code when added to an .htaccess file will automatically redirect any traffic destined...
How to restore cpanel backup with new username?Everybody knows, how to restore the cpanel backup using scripts command but most of us doesn’t...
How to test keep-alive is working on client endYou can use Curl like this: curl -Iv http://www.aptivate.org 2>&1 | grep -i 'connection...
How to update snap-store linux$ killall snap-store$ snap refresh
How to use du to see files greater than a threshold sizeTo only show folders over 1GB in size: du -h --threshold=1G You may also want to order by size,...
IP canonicalization via htaccessYou generally don't want to mix Redirect (mod_alias) with RewriteRule (mod_rewrite) because they...
Install memcacheStep 1: Login into your WHM panel and using easyapache enable Memcache Step 2: SSH into...
Kill all processes running by a partitionIn some occasions you ould need to kill all the process running by a partition in order to umount...
PHP.INI settings Disable exec, shell_exec, system, popen and Other Functions To Improve SecurityOpen a terminal application or login to your server over the ssh session using ssh command. Open...
PHP.INI settings Disable exec, shell_exec, system, popen and Other Functions To Improve SecurityPHP has a lot of functions that can be used to crack your server if not used properly. You can...
PHP: Is it safe to add /usr/bin to open_basedir?No, it isn't safe to add /usr/bin to open_basedir. Once an attacker can execute arbitrary PHP...
Page Speed: Enable gzip compressionWhat is gzip compression? When a user hits your website a call is made to your server to...
Secure Apache from Clickjacking with X-FRAME-OPTIONSClickjacking is a well-known web application vulnerability. To defend against the Clickjacking...
Server Benchmark Scripts To Test VPS PerformanceYet Another Benchmark Script (YABS) Created by MasonR, what the script does are: Fetching...
Setting up a permanent 301 redirect via .htaccessA permanent 301 redirect in your .htaccess file lets search engines and others know that a old...
Temporary redirect to maintenance pageRewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !^/maintenance\.html$ RewriteRule...
Ubuntu: “Failure to download extra data files” after installing ttf-mscorefonts-installerSolution 1: Connect to the internet and run this command below, to fix the error sudo apt-get...
Unzip Multiple Files in LinuxLet us suppose that a folder, a “zip_files” folder in our case, contains multiple zipped files...
Using MYSQLTUNERMySQLTuner is a script written in Perl that allows you to review a MySQL installation quickly and...