IANA port assignments

(via www.iana.org)

The port numbers are divided into three ranges: the Well Known Ports,
the Registered Ports, and the Dynamic and/or Private Ports.

The Well Known Ports are those from 0 through 1023.

The Registered Ports are those from 1024 through 49151

The Dynamic and/or Private Ports are those from 49152 through 65535

Mod_Rewrite Tips and Tricks

(via www.askapache.com)

Mod_Rewrite Tips and Tricks are lot of .htaccess rewrite examples that show specific uses for creating .htaccess rewrites to do all kinds of cool and profitable stuff for your site. Htaccess Rewrites are enabled by using the Apache module mod_rewrite, which is one of the most powerful Apache modules and features availale. Htaccess Rewrites through mod_rewrite provide the special ability to Rewrite requests internally as well as Redirect request externally...

Munin stats for apache and lighttpd

Get status of apache (80) and lighttpd (81) on different ports:

This is done at the nodes.

  1. Enable apache server-status in httpd.conf :
    <Location /server-status> 
        SetHandler server-status
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
    </Location>
  2. Enable lighttpd server-status in lighttpd.conf :
    $HTTP["remoteip"] == "127.0.0.1" {
    status.status-url          = "/server-status"
    }
  3. Create /etc/munin/plugin-conf.d/apache:
    [apache*]
    env ports="80 81" 

    * Test with:

    ports="80 83" /etc/munin/plugins/apache_processes

lighttpd idle process will be a straight line as total of busy and idle process is always the same when drawn as STACK, . To change this to LINE1:

At the host, edit "/etc/munin/munin.conf" and add the below line to the corresponding host:

apache_processes.idle81.draw LINE1

Lighttpd client side optimization

  1. Edit conf file: /etc/lighttpd/lighttpd.conf
  2. Enable mod_expire and mod_compress.
  3. Expire static files set for 3 days:
    $HTTP["url"] =~ "\.(js|css|gif|jpg|png|ico|txt|swf|html|htm)$" { expire.url = ( "" => "access 3 days" ) }
  4. Compress mime types:
    compress.cache-dir         = "/var/cache/lighttpd/compress/"
    compress.filetype          = ("text/plain", "text/html", "text/css", "text/xml", "text/javascript")
  5. Cleanup the compressed cache via daily cron script:
    #!/bin/bash
    # lighttpd_cache_clean
    # Clean cache stored at /var/cache/lighttpd/compress
    # Place in /etc/cron.daily

    # Cache dir path
    CROOT="/var/cache/lighttpd/compress"

    #Deleting files older than 3 days
    HOURS=72

    # Lighttpd user and group
    LUSER="lighttpd"
    LGROUP="lighttpd"

    # start cleaning
    /usr/sbin/tmpwatch --mtime ${HOURS} ${CROOT}

    # if directory missing just recreate it
    if [ ! -d $CROOT ]
    then
            mkdir -p $CROOT
            chown ${LUSER}:${LGROUP} ${CROOT}
    fi

    exit 0
  6. Create the cache directory and update permissions:
    mkdir -p /var/cache/lighttpd/compress
    chown lighttpd:lighttpd /var/cache/lighttpd/compress
  7. Restart lighttpd.

Kismet – An 802.11 wireless network detector, sniffer, and intrusion detection system

(via www.ubuntugeek.com)

Kismet is a 802.11b wireless network sniffer. It is capable of sniffing using almost any supported wireless card using the Airo, HostAP, Wlan-NG, and Orinoco (with a kernel patch) drivers.Kismet identifies networks by passively collecting packets and detecting standard named networks, detecting (and given time, decloaking) hidden networks, and infering the presence of nonbeaconing networks via data traffic.

Managing RAID and LVM with Linux

(via www.gagme.com)

A general easy to follow guide to setting up RAID-5 and LVM on a modern Linux system.

Create pdf of manual pages

Below command will convert and create a pdf of a manual page.

man -t man | ps2pdf - > man.pdf

Linux Command Line Reference

(via www.pixelbeat.org)

Linux command line reference for common operations...

Install Ubuntu kernel updates without rebooting using Ksplice Uptrack

(via www.ubuntugeek.com)

Ksplice Uptrack is an update service for the Linux kernel; it automatically delivers security and reliability improvements to your machine, without the disruption of rebooting.

Full Story

Howto install VLC media player 1.0.0 in Ubuntu

(via www.ubuntugeek.com)

VLC media player is a highly portable multimedia player for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, mp3, ogg, …) as well as DVDs, VCDs, and various streaming protocols.It can also be used as a server to stream in unicast or multicast in IPv4 or IPv6 on a high-bandwidth network.

Syndicate content
Comment