MAMP add virtualhosts

If you want to run your own VirtualHosts when you are using MAMP on Mac, just do the following step:

1.) Open your terminal

2.) Run: pico /Applications/MAMP/conf/apache/httpd.conf

3.) Add the following to the bottom of the file (change for your values):

NameVirtualHost *

DocumentRoot ”/Applications/MAMP/htdocs/”
ServerName localhost

DocumentRoot ”/Applications/MAMP/htdocs/YOUR-PATH”
ServerAlias *
4.) Save

5.) Open your hosts file, ”sudo pico /etc/hosts”

6.) Add your domain and point it to your localhost (add at the bottom of the file):

7.) Save and your done

If you want to check your configuration, just run: apachectl configtest


ISPCP Omega upload problem size over 150kb

I just upgraded our webserver from ISPCP Omega 1.0.5 to 1.0.7 and also upgraded our Debian dist from Lenny to Squeeze and run into a problem with PHP upload size. It seemed as if the upload limit had been set to 150kb (php.ini upload_max_filesize ), but it had not. Instead there was a limit in fcgid_ispcp.conf file.

If found my answear in this post

In case the posts get deleted I will paste the guide here:
1. vim /etc/apache2/mods-enabled/fcgid_ispcp.conf
2. Add MaxRequestLen 157286400 inside the tags <ifmodule>
3. Restart apache: /etc/init.d/apache2 restart

Got grub rescue when uninstalling Linux?

Have you uninstalled Linux or changed the partitions and ended up with the ”grud rescue” when restarting?

Well, then you are not the first one. Simply whats happened is that you screwed up your booting software.

Now what you need to do is to find your Windows CD, put it in your CD-drive, restart your computer, start the windows installation, select ”repair” (do not reinstall windows), choose ”command promt”, type in the following commands:

bootrec /fixmbr
bootrec /fixboot

(If your on a Swedish keybord, which I am, use the ”-” key (to the left of the right shift key) to type ”/”)

Now, eject the CD and restart the computer.

Change boot order between Ubuntu and Windows (grub)

If you are running Ubuntu and Windows on the same machine with help of a boot loader, you might run into to problem that the wrong operating systems starts when you start your computer.

There are two ways to fix this, the hard way and the easy way, I will show you the easy way.

Boot your computer into Ubuntu, go to the ”Software download center”, search for ”grub”, the first option that pops up is ”Start-manager”, install that application. When it is installad just go to ”Settings -> administration -> Start-manager” then you will find a dropdown with the label ”Default operating system”. Just select your operating system, close the window and reboot your computer.

Ta da!