Tag: ubuntu

  • https in 5 easy steps

    Simple 5 step guide to setting up https with your own self-signed certificate
    Prerequisites: Apache2, Ubuntu Server

    1. Generate local keypair
      /usr/bin/openssl genrsa -des3 -out {your domain name}.key 3072
    2. Create self-signed certificate
      /usr/bin/openssl req -new -key {your domain name}.key -x509 -out {your domain name}.crt

    3. Configure your host on port 443 to use the certificate
      <VirtualHost {your ip}:443>
      ...
      SSLEngine on
      SSLCertificateFile {path where certificate is}/{your domain name}.crt
      SSLCertificateKeyFile {path where key file is}/{your domain name}.key

      SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
      ...
      </VirtualHost>
    4. Optional: If you do not want to enter key password each you restart Apache, you can embed the password in key itself.
      /usr/bin/openssl rsa -in
      {path where key file is}/{your domain name}.key -out {path where key file is}/{your domain name}.key.nopass
      Remember to update your Apache configuration to use the new file
      # SSLCertificateKeyFile {path where key fileis}/{your domain name}.key
      SSLCertificateKeyFile {path where key file is}/{your domain name}.key.nopass
    5. That’s it view it. Restart your apache to load the new configuration. And try accessing your url with https://

    If you receive a certificate warning, simply accept it, and proceed. Congratulations, your communication is now encrypted, and safe from prying eyes!

    Self-signed certificate

  • Set MySQL to UTF-8

    Change the following in my.cnf
    
    [mysqld]
    default-character-set= utf8
    skip-character-set-client-handshake
    character-set-server= utf8
    collation-server= utf8_general_ci
    init-connect= 'SET NAMES utf8'

    via M’sNOTE  MySQL(デフォルト文字コード)の設定 – Ubuntu9.04.

  • kill zombie process’s – Ubuntu Forums

    ps -A -ostat,ppid,pid,cmd | grep -e '^[Zz]'
    To find zombie processes

    kill zombie process’s – Ubuntu Forums.

  • Server upgraded to new Ubuntu 9.04 server

    The website is up, and running on a brand new OS – Ubuntu 9.04 Server. Supercool to configure, has pre-configured LAMP, OpenSSH out-of-the-box.
    Using the UFW was too easy than messing with iptables, or routing.
    Feeling great having refreshed up my home server with a mature OS.