Question: I was wondering how I would go about setting up the virtual hosts so that I just have to enter www.mydomain.com:9090 to go to phpmyadmin. This is how I have my vhosts set up right now in httpd.conf:

```
<VirtualHost *:80>
    DocumentRoot /var/www/html/
    ServerName mydomain.com
    ServerAlias www.mydomain.com
</VirtualHost>

<VirtualHost *:9090>
    DocumentRoot /usr/share/phpMyAdmin/
    ServerName mydomain.com
    ServerAlias www.mydomain.com
</VirtualHost>

```

This does not seem to be working.

Answer: 
It might be that multiple different delegate functions are wired to the event. Hopefully the following little example will make it clearer as to what I mean.

```
// Simple class to host the Event
class Test
{
  public event EventHandler MyEvent;
}

// Two different methods which will be wired to the Event
static void MyEventHandler1(object sender, EventArgs e)
{
  throw new NotImplementedException();
}

static void MyEventHandler2(object sender, EventArgs e)
{
  throw new NotImplementedException();
}

[STAThread]
static void Main(string[] args)
{
  Test t = new Test();
  t.MyEvent += new EventHandler(MyEventHandler1);
  t.MyEvent += new EventHandler(MyEventHandler2); 

  // Break here before removing the event handler and inspect t.MyEvent

  t.MyEvent -= new EventHandler(MyEventHandler1);      
  t.MyEvent -= new EventHandler(MyEventHandler1);  // Note this is again MyEventHandler1    
}

```

If you break before the removal of the event handler you can view the invocation list in the debugger. See below, there are 2 handlers, one for MyEventHandler1 and another for the method MyEventHandler2.

![enter image description here](https://i.stack.imgur.com/82wNM.png)

Now after removing the MyEventHandler1 twice, MyEventHandler2 is still registered, because there is only one delegate left it looks a little different, it is no longer showing in the list, but until the delegate for MyEventHandler2 is removed it will still be referenced by the event.

![enter image description here](https://i.stack.imgur.com/kW6BY.png)
Are you unhooking the right reference? When you unhook using `-=` no error is produced and if you're unhooking events which aren't hooked nothing will happen. However if you add using `+=` you'll get an error if the event is already hooked. Now, this is only a way for you to diagnose the problem but try adding the events instead and if you *DONT* get an error the problem is that your unhooking the event with the wrong reference.