Auf und ab.

How to set up multiple virtual hosts on Apache 2 on Ubuntu or in everyday language create multiple sites when developing on a local machine

Setting up your local environment after a reinstall is always a hassle. Especially if you like I don’t bother to back-up the configuration files. So what do you do to set up several sites on your local machine to work on, in Ubuntu using Apache 2.

1. Edit hosts file in /etc directory
Add this line to the hosts file for every site	localhost.yoursitename

2. Edit ports.conf file in /etc/apache2 directory
Make sure this is written in the file nothing else about listens etc

Listen 80
NameVirtualHost *:80

3. Edit your default file in /etc/apache2/sites-available directory
Put this on top before the VirtualHost bracket begins.

ServerName localhost

4. Edit your myconfig file in /etc/apache2/sites-available directory
Add this for every site you add

        ServerName localhost.yoursitename
	DocumentRoot /home/username/www/yoursitename/
                Options Indexes FollowSymLinks MultiViews +Includes
		AllowOverride All
		Order allow,deny
		Allow from all

5. Restart Apache with: sudo /etc/init.d/apache2 restart

Fixing Apache 2 error – Could not reliably determine the server’s fully qualified domain name, using for ServerName

No matter how many times you have installed LAMP and configured Apache – you still have to look up certain details that you forgotten about since it was a half year since you did that etc. Anyways I got this error / warning on Ubuntu machine when setting up a LAMP for local development:

apache2: Could not reliably determine the server’s fully qualified domain name, using for ServerName

I am guessing this means that Apache can’t find the default server name and is using as default. Not what we want so we edit the apache default config file in /etc/apache2/sites-available/default and put in on the first line:

ServerName localhost
Case solved.

Evolution of the Bookle poster.

Running the site for used course literature at KTH has given me the opportunity to practice my poster skills. I think they came out pretty all right.

Read More »

Curing the problem of a stuttering Spotify on Ubuntu, Linux / Lösning på problemet med hackigt Spotify på Ubuntu, Linux

So I installed the new Ubuntu 9.10 and all of a sudden my Spotify was stuttering uncontrollably, like crazy. I tried restarting, shutting down, turning on and so on. Nothing worked. After some research on forums I realized that it might have to do with the Wine sound drivers in some way, that Spotify uses on Ubuntu. After messing around a bit with different settings I found an easy working solution.

Click Wine config in the Applications menu under Wine. Select the tab named Audio. Uncheck the default Alsa driver, check the Esound Driver and click OK.

This worked perfectly for me no more stuttering!

How to make text span two or more columns in Open Office Calc – or in computer lingo merge the cells…

So I was set with the daunting task of making text in one cell span several columns in Open Office Calc. When I don’t know how to do things I usually ask Google. Searching for “make text span two columns in open office” gave me no results except a bunch of programming macros wikis for Open Office. After much searching I realised that I might have to rephrase the actual question because when computer people use their lingo they seldom bother to rephrase the explanation in other terms than those in use. So merging cell it was. It got me thinking how information is not formed as questions/tasks but as commands in these programs. My task was to make text span several columns but the program only knows how to merge columns i.e. no results on Google.

So how do you do it?

Select the cells that the text should span => Click Format in the menu => Choose Merge Cells => And then once again Merge Cells in the sub menu.

This will make the cells one big cell and you can just let the text flow in there.

A short non-technical essential beginners guide for Drupal – post now!

A non-technical beginners guide to Drupal doesn’t seem to exist. My clients always need some help get started and I always end up writing an introduction over and over again so I decided I should make short guide that could easily be deployed when receiving the site. Feel free to comment or give some tips. I usually deploy with Garland as the admin theme so the tutorial will be built on this.

Short Drupal user manual

by Martin Hjelm :::

Logging in

To be able to administer the site you need to be logged in. To log in go to: your URL /user. Fill in the user name and password.

Publishing content

Create content -> Content type -> Preview -> Publish

To publish content click the create content link after logging in or if on the admin pages click the create content link in the left menu. After clicking choose what kind of content you wish to create. A description of the content is shown underneath the specific type. After choosing a content type you will be given a form with specific fields for that content type. Fill in the form. Preview if you want, then click publish when satisfied. Read More »

Herro world!

Hansuri hatturi!

Auf und ab. (RSS) + Sator-ii theme by Felipe Lavín