Rubyonrails enabled!

I have installed Ruby on my FreeBSD 5.4 RELEASE, rubygems, rails, FastCGI and mod_fastcgi.. and walla, i’m riding on rails 😀


Below i jot it down, how to install ruby on rails in FreeBSD. For this case, I will install ruby 1.8.4, rubygems, rails, FastCGI 2.4.0 and mod_fastcgi 2.4.2 on a FreeBSD 5.4 RELEASE machine.

#Get all the files needed.
cd /usr/local/src/

# Install ruby on the system.
tar -zxf ruby-1.8.4.tar.gz
cd ruby-1.8.4
./configure && make && make install && cd ..

# Install rubygems-0.8.11
tar -zxf rubygems-0.8.11.tar.gz
cd rubygems-0.8.11
ruby setup.rb

# Install rails
gem install rails -y

# Install FastCGI
tar -zxf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0
./configure && make && make install && cd ..

# Install mod_fastcgi
tar -zxf mod_fastcgi-2.4.2.tar.gz
cd mod_fastcgi-2.4.2
apxs -o -c *.c
apxs -i -a -n fastcgi

# Create fcgi temp directorys
mkdir /tmp/fcgi_ipc/
mkdir /tmp/fcgi_ipc/dynamic/
chmod -R 777 /tmp/fcgi_ipc/

# Add an module entry into httpd.conf

FastCgiIpcDir /tmp/fcgi_ipc/
AddHandler fastcgi-script .fcgi
FastCgiWrapper /usr/sbin/suexec

#Restart httpd. You might need to apply your own way to do this, depending on your system.
/usr/local/etc/rc.d/httpd restart

The environment of each website hosted for ruby on rails also need to be created. The guide below will be specifically for direct admin. Root document of each server in DirectAdmin is configured at /home/example/domains/, example and is for this example only

cd /home/example/domains/
rails rails_app
mv public_html old_public_html
ln -s rails_app/public public_htm
cd rails_app
chmod 755 public

And, you can point your browser to, and you will be riding on rails too! 😀 Create your controllers/models, configure your routes, configure your database file, and you’re off! You can start working on Ruby applications on rails

The above guide are just to prepare the system for ruby on rails environment..For the development part, this link would be good for you.
Howtos in Ruby on Rails

Will come up more in ruby 😉

Tunnel traffic over ssh

I had a problem previously on how to access my server control panel, that runs on port 2222, that was blocked by my network administrator. There is an option to access it, through ssh tunnel. This can be done using putty ssh client in windows, and command line ssh in Linux.
For sure for ssh tunneling, you would need a ssh account, anywhere.

You just need to connect to your client as usual, but before that, please take note about tunneling. You need to mention the local and remote port to the destination server.

For Linux user

For linux user, ssh tunneling can be done just with a single command line.

# ssh -L

The left port number will represent the local port, and the right side is the remote port you want to access.

After that, just fire up your browser, and point to http://localhost:2222. WALLA!

You need to bare in mind about few things that you need to consider. You cannot do ssh tunneling for a port number below 1024 unless you logged in into ssh account as root. Only root user can bind to a port below 1024.


Proper education related to hosting when imparted, results in adequate domain names as well as proper seo, not just pay per click.

Someone steal my bandwidth

I just noticed an immediate increase bandwidth in one of my sponsored hosting website, When I check the referer, I finds out there is one website who put my into his website. He is feeding his visitor with my bandwidth.

So, I fire up google and search for “php how to check referer”, I found the hacks to solve it. This script will actually check for referer before it loads. Specify your own server, replace If the request was not from, it will just display, “Nice try

< ?php if ( eregi ( "", $_SERVER['HTTP_REFERER'] ) ) { // do something } else { echo "Nice try"; } ?>

Now, the website cannot view the radio blog in his website. Instead, there is a message comming out 🙂

No more bandwidth stealing

Scientific explaination in Google Search popularity


[Picture from here]

I found an article about how Google positions their search result and the ads in a way that it is so effective. This feature will for sure attract the advertiser to invest in Google AdWords..

The arrangement made a F-shape area, where user will browse from the left page, vertically, searching for pictures or keywords that they are looking for, and then move to the right side for any additional information.

Reference [Dead link now]

Mozilla rules! Mozilla users are safer

2 researchers and a pair of graduate student at University of Washington have found that Mozilla user is less vulnerable to security issues, compared to IE.

They have reseased web-crawlers to 45,000 website and perform some test of todays browsers vulnerability to conduct the test.

Download the latest Mozilla Firefox now, at and tweak it for best performance 🙂

ASCII Art Generator

ASCII art is an art of combining characters laid out to form a pattern on screen. Its nice to be used in a text mode environment, such as ssh, irc, and other similar environment, just to get yourself not too boring 🙂

You can go to this site,, where you can generate different ASCII art to form a text in different size and font.

This is an example
Example of ASCII art as welcome message in ssh

You can change welcoming message of ssh in the file /etc/motd/. Try relogin and you will see the welcoming message

After 1Y0-259 and EX0-101, all the PMI-001 professionals are fully qualified to write 642-825.

SSH Quick login, without password

This is a techniques that enables you to login into a remote Linux machine without having any password challenge. You can immediately logged in your remote linux machine, with a single ssh command.

This technique requires a pair of keys, generated on your local machine. The public key will be placed in the remote machine, and the private key resides on your local machine. During key generation, it will prompt for the key password. You need to leave it empty, for no password login.

This technique is useful for administrators that need to login and manage alot of computers from a single machine. No more hassle to key in password in each of the remote machine. This technique is also useful if you want to make a shell script to transfer a file using scp (Secure Copy). The file will be transfered wthout any password challenge, and will be transfered securely.

First thing to do, generate the key pair on your local machine.

su-bash$ ssh-keygen -t rsa

For the key password, leave it blank

The key pair generated are being store at /home/budihost/.ssh/
The public key, need to be transfered into .ssh folder in the remote machine.

su-bash$ ssh server “mkdir .ssh; chmod 0700 .ssh”
su-bash$ scp .ssh/ server:~/.ssh/authorized_keys

You can now try to login to your remote machine,
su-bash$ ssh -l budihost server
You will be logged in without any password prompt

Writing 70-294 and 70-536 is the next step for a 70-642 professional after they are done with 642-642 and 642-845.