Linux

Open Source Operating System

Add www to URL using Apache mod_rewrite

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

Technologies: 

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

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.

Understanding Server Bottlenecks

Technologies: 

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

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.