Monday, February 18, 2008

Apache prompt for pass-phrase on every start up

My Apache wasn't start when I rebooted the machine. It was prompting for pass-phrase while nobody was sitting in front of the machine. I'd better get rid off the the pass-phrase dialog to be prompted.

Found the solution as below.

How can I get rid of the pass-phrase dialog at Apache startup time?

The reason this dialog pops up at startup and every re-start is that the RSA private key inside your server.key file is stored in encrypted format for security reasons. The pass-phrase is needed decrypt this file, so it can be read and parsed. Removing the pass-phrase removes a layer of security from your server - proceed with caution!

  1. Remove the encryption from the RSA private key (while keeping a backup copy of the original file):

    $ cp server.key server.key.org
    $ openssl rsa -in server.key.org -out server.key

  2. Make sure the server.key file is only readable by root:

    $ chmod 400 server.key

Now server.key contains an unencrypted copy of the key. If you point your server at this file, it will not prompt you for a pass-phrase. HOWEVER, if anyone gets this key they will be able to impersonate you on the net. PLEASE make sure that the permissions on this file are such that only root or the web server user can read it (preferably get your web server to start as root but run as another user, and have the key readable only by root).

As an alternative approach you can use the ``SSLPassPhraseDialog exec:/path/to/program'' facility. Bear in mind that this is neither more nor less secure, of course.


source: http://httpd.apache.org/docs/2.0/ssl/ssl_faq.html#removepassphrase

Thursday, February 14, 2008

Instal Apache SSL on Ubuntu

Here are the list of installing Apache (version 1) with SSL on Ubuntu.
  • apt-get install apache libapache-mod-ssl
  • dpkg-reconfigure libapache-mod-ssl
  • fill in all details with your details
  • cp /usr/share/doc/libapache-mod-ssl/examples/mod-ssl.conf /etc/apache/conf.d/
  • cp /usr/share/doc/libapache-mod-ssl/examples/vhost.conf.gz /etc/apache/conf.d/
  • cd /etc/apache/conf.d/
  • gzip -d vhost.conf.gz
  • edit vhost.conf and change all snakeoil references to server. ie. snakeoil-dsa.crt = server.crt
  • stop apache
  • start apache
Have fun !!!

Sunday, December 30, 2007

Wordpress Shoutbox

I was searching a good shoutbox for my hosted wordpress blog. Then I found a wordpress plugin for shoutbox. The name of the plugin is Wordspew. It was difficult to find out the pluggin because it is not maintained anymore by Andrew, while most of the posts I found on google were pointed to Andrew.

Finally I found the link of where the latest update can be downloaded.
Here is it, on Pierre's website.

Saturday, December 22, 2007

Installing SSLeay on Ubuntu

I had a very hard time to install SSLeay on Ubuntu either by using cpan or compiling it directly from the source. It looks like that some headers were missing on the compilation process so I got so many errors and unable to compile the module.

I finally realized that there are always an easy way to do it on Ubuntu, as usual, by using apt-get.
Here is the command to install SSLeay on Ubuntu
sudo apt-get install libnet-ssleay-perl
sudo apt-get install libcrypt-ssleay-perl

Tuesday, November 13, 2007

Installing Debian without any CD installer

I really wanted to install Debian on my machine but I didn't have any CD installer of Debian. I was thinking of downloading the image from the web, but unfortunately I didn't have any empty CD to burn the image.
Finally I found a very good page on Debian website, telling that it is possible to install Debian without any Debian CD. It said that Debian can be installed over the network as long as I have a working *NIX OS on my machine. It is a very good solution to me since I have Ubuntu already on my machine. Then I only need to create another partition for Debian, follow the steps, and then now I'm running Debian.

The complete instructions can be found here

There are some additional steps need to be done on my machine since the instructions above will only install Debian without the GUI.
Here are the steps:
1) Login as root
2) apt-get install x-windows-system-core
3) apt-get install gdm
4) apt-get install gnome

That's it. Have a nice try.

Monday, November 5, 2007

RootGuard

RootGuard prevents a port to be a ND (non designated) port. So the port should always be designated. If the port receive a better BPDU, the port will become root-inconsistent state and the port will be blocking