Setting a drupal 7 Multisite to localhost

Without a powerful server drupal administration online is very slow. As I have a multisite online, for some bigger changes I decided to take it offline to localhost and try to build/change things on my computer an then upload DB online. But first I needed to configure my localhost to work with multisite. Procedure is similar as on VPS with LAMP (having WAMP locally) but you need to change some different files.

So first thing you need to do is enable this possibility with

Enable Virtual Host

Open C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf in Notepad (insert your Apache version number instead of 2.2.11).
Remove the # before Include conf/extra/httpd-vhosts.conf
and save.

Then Add Virtual Host(s)

Open C:\wamp\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf in Notepad and add these lines at end of file

<VirtualHost *:80>
DocumentRoot c:/wamp/www/drupal7
ServerName site1
</VirtualHost>

<VirtualHost *:80>
DocumentRoot c:/wamp/www/drupal7
ServerName site2
</VirtualHost>

Where c:/wamp/www/drupal7 is the root of your multisite and then in the end

Map Virtual Hosts in

Open C:/Windows/System32/drivers/etc/hosts in Notepad and add these lines after

127.0.0.1 localhost
127.0.0.1 site1
127.0.0.1 site2

Also edit your settings.php and add

$base_url = 'http://site1'; // NO trailing slash!

Restart apache and just type in your browser site1 and it should work. Ofcourse you need to create/upload your database first and have database user, and also change settings.php but all of this you probably already know (If you don't this whole task is out of your league).