Subscribe via

How to Encrypt Your Internet Traffic

This is the coolest trick I learned while working at Blinkx. At the time, our management really hated when we go on any type of instant messaging applications. I also suspected that our messenger conversations and other internet activities were being monitored. I was pissed so this is what I did to combat their nosiness. Read on…

The Simple Explaination and Use of SSH keys

What are SSH Keys? (Easier than what you learned in Computer Security class)

SSH keys are one of the common authentication techniques people use to log into a Unix session (the most common authentication technique is login & password).

If you are like me, you get sick and tired of typing in your login and password every single time you open a new terminal to connect to a Unix session. This is where SSH keys help me everyday by letting me authenticate against the key once, and every new shell session I start will authenticate using the same SSH key.

All you have to do is create a pair of public and private keys. In this analogy, the public key is the house lock and the private key is equivalent to the house key.

Private Key = House key

Public Key = House locks

Using an SSH key to authenticate is like using one key for all the doors in your house instead of having a bunch of combination padlocks (with the same unlock combination) on all your doors.
Read on…

Recapping: Setting up a FreeBSD 6.2 Web Server

I hope I can get some part-time consulting jobs to do this optimization for small businesses. All in all, it doesn’t seem too hard to do and I enjoyed doing it. If you run into a problem just google it for the answer. Anyway, here is the recap of the steps I took to set up my FreeBSD 6.2 Web Server.

  1. Installing OS
  2. Setting Up Apache, MySQL, and Other Services
  3. Migrating WordPress from WinXP to FreeBSD
  4. Optimizing Apache
  5. Optimizing MySQL
  6. Optimizing PHP
  7. Proxy Caching
  8. Optimizing WordPress with WP-Cache
  9. Keeping Your FreeBSD Ports Up-to-Date Effortlessly
  10. Setting Up Sendmail on FreeBSD 6.2

Setting up a FreeBSD 6.2 Web Server: Proxy Caching (Part 7)

Okay I lied, eAccelerator gives a pretty darn high ROI, but setting up a proxy cache gives a comparable or higher ROI. I chose to use Varnish as my proxy cache.

Once installed, Varnish will keep a cache of all objects requested by internet users (e.g. post-generated PHP pages, CSS, javascripts, images) with the goal of off-loading some work from your web server (remember: we won’t want big Apache to do the work only if it has to). Also Varnish takes full advantage of the OS’s virtual memory and advanced I/O features on FreeBSD 6.x making it the optimal choice for my setup.

There were many confusing instructions on the web about how to configure Varnish. Here are the steps I took to setting up Varnish for a signal machine running both Varnish and the web server: Read on…

Setting up a FreeBSD 6.2 Web Server: Optimizing PHP (Part 6)

Comments Off on Setting up a FreeBSD 6.2 Web Server: Optimizing PHP (Part 6)

This was by far the easiest step in my optimization process. To optimize PHP, I used the software called eAccelerator. Compared to all of the other steps, this one had the best ROI for me.

When a PHP script is executed, the PHP interpreter will spend some time interpreting the script then compile the interpretations into opcodes for execution. eAccelerator will precompile your PHP code into ready executable opcodes and manage that opcode cache for you. If your PHP script does not change, Apache will directly call the precompiled opcodes (saving interpretation and compilation time).

This is what I did to set it up: Read on…

Setting up a FreeBSD 6.2 Web Server: Optimizing MySQL (Part 5)

Similar to Apache, you do not want MySQL to start hogging all the memory in your system. To configure your MySQL settings, open your /etc/my.cnf file for editing. Under the [mysqld] section of the file modify the following variables: Read on…

Setting up a FreeBSD 6.2 Web Server: Optimizing Apache (Part 4)

After my WAMP days were over I declare that I shall no longer fall victim to an inefficient/unoptimized lifestyle. So here is my home brew optimization tutorial (yes, I really did it myself this time!). Read on…

Setting up a FreeBSD 6.2 Web Server: Migrating WordPress from WinXP to FreeBSD (Part 3)

Background

I previously made a an awfully painful choice to host this site on my WindowsXP machine using WAMP (FYI, WAMP = Windows, Apache, MySQL, PHP packaged into one install). WAMP and I had a 10-month-long love-hate relationship: Read on…

Setting up a FreeBSD 6.2 Web Server: Apache, MySQL, etc (Part 2)

I admit that I cheated, but since I’m newbie in FreeBSD, I am allowed to follow another very nice tutorial on deploying a server found on Open Addict. My job is not to recite the tutorial to you. Instead I will comment on the tutorial’s instructions and point out any roadblocks I ran into during my installation process. Read on…

Setting up a FreeBSD 6.2 Web Server: Installing OS (Part 1)

This post will cover installing FreeBSD 6.2. FreeBSD was recommended to me by my friend Ben Connelly because it is known to be the most stable and secure Unix OS out there. After I installed it, I became even more pleased at my decision because of the package manager and BSD ports. If installing using the package manager doesn’t work, you can most likely make port-install work on the same software. Also since it is so stable, you are 99% sure that anything you install WILL work. Read on…