Skip to main content

Linux

Open Source Operating System

Clear Sendmail Queue

Submitted by system on
To clear the sendmail queue, one can manually delete the contents of the folder: /var/spool/mqueue. To see the contents of the queue,one can type the command.
mailq
-- Source: http://www.cyberciti.biz/faq/linux-unix-bsd-clear-sendmail-queue/

Add www to URL using Apache mod_rewrite

Submitted by amitsedai on
For sites belonging to a domain name(Not Subdomain), one can access the site using the domain name with www, Ex: www.example.com or without it: example.com Both ways the site can be accessed when a ServerAlias is created in the config. However this is confusing as session information for both is different, which means if one is accessing the site with www preceded and logs in, on accessing the site without www preceded - the server would have no information saved. To redirect any domain name to use www by default, the following mod_rewrite condition can be used:

Handling Unwanted Stuff

Submitted by amitsedai on
This is not a post for handling SPAM. Please find the following Softwares you would need to install. 1. ModSecurity supplies an array of request filtering and other security features to the Apache HTTP Server, IIS and NGINX. ModSecurity is a web application layer firewall. 2. Mod_evasive prevents against ddos and scripted bots which can hammer a website. Mod_evasive is the Web Denial of Service module used in ASL. It is designed to throttle http and https connections when they reach above a specified threshold.

Disabling Munin and Awstats

Submitted by amitsedai on
Munin is a server and network monitoring tool. AWStats is a free powerful and featureful tool that generates advanced web, streaming, ftp or mail server statistics, graphically. This log analyzer works as a CGI or from command line and shows you all possible information your log contains, in few graphical web pages. Sometimes both can result in High Server i/o due to its periodic cron tasks. Uninstalling via command line wont help as you may see cron based tasks for Munin and Awstats running in logs.

RSync file transfer on a different port

Submitted by amitsedai on
To transfer file to a different port using RSync: rsync -avz --progress --rsh='ssh -p1516' source user@host:destDir/
rsync -avz -e "ssh -p $portNumber" user@remoteip:/path/to/files/ /local/path/
The source can be a file or a directory to be copied to the destination directory --source: http://www.linuxquestions.org/questions/linux-software-2/rsync-ssh-on-different-port-448112/ http://mike-hostetler.com/blog/2007/12/08/rsync-non-standard-ssh-port/

Understanding Server Bottlenecks

Submitted by amitsedai on
If the server becomes slow or unresponsive, execute the top command. The first thing to look is the load average. The load average typically looks like this: load average: 0.49, 0.41, 0.35 . The first number represents the server load average currently, the 2nd number for load average 5 minutes ago and 3rd number for 15 minutes ago. if you have 1 CPU and the load average is 1, it means that the server has been busy constantly. Four 4 core machine if the average is 4, then all cores are busy.

PiTiVi Video Editor - A Look

Submitted by amitsedai on
I wanted to try a Linux based video editor for editing video files which would do both video editing, converting and video compression using various encoding schemes. I had a hands on with ffmpeg command line video compression and conversion tool. I felt it was impressive. I am not a very much versed in video editing. I needed a tool that would help me do the basic stuff without much fuss. Fortunately, I found PiTiVi as just the right tool I needed. PiTiVi is a free, intuitive and featureful movie editor for the Linux desktop.