I’m currently evaluating Small Business Server 2008 on a machine which I also use for testing websites and learning PHP. With such tight integration of IIS7 to run the SBS services of remote access to Exchange email, SharePoint and even just web-based remote access of machine it makes it impossible to simply stop IIS and replace it with Apache. Instead we need to set them both up to run side-by-side.
At first I told Apache to run on a different port but got tired of appending the port number to the URL every time I needed to access it from my PC.
After some more research I found a way of giving the server a second IP address and running IIS7 on one and Apache on the other, both still on port 80. One caveat to this setup is that to keep outside access to Small Business Server’s remote applications is that external SSL connections on port 443 must remain routed to IIS7.
Add a Second IP Address
- Login to your server’s desktop and click Start –> Control Panel then open Network and Sharing Center and click Manage Network Connections under Tasks in the left panel
- Right-click the machine’s network adapter and click Properties, clicking Continue on the UAC prompt if enabled
- In the list select Internet Protocol Version 4 (TCP/IPv4) and click the Properties button
- In the Properties dialog click the Advanced… button down the bottom-right
- On the IP Settings tab click the Add… button in the IP addresses grouping
- Enter the new IP address of your choice and the required Subnet mask then click Add
- You should now have two IP addresses assigned to your machine. Click OK or close all open dialogs and windows
Bind IIS to a Single IP Address
By default IIS listens on all IP addresses assigned to the machine. We need to change this and bind it to only one. I chose to keep IIS running on the original IP address (In my case 192.168.1.100) and run Apache on the second one I assigned to it (192.168.1.110).
- Click Start, type “cmd” in the search box then right-click cmd.exe in the Programs list and choose Run as Administrator. Click Continue on the UAC prompt
- In the command prompt type the following:
netsh http show iplisten
The list returned should be empty - In the command prompt type:
netsh http add iplisten ipaddress=192.168.1.100
Replacing 192.168.1.100 with the existing IP address of your machine - Type out the show command from step 2 a second time and you should see your IP address in the list
- Reboot the IIS services by typing the following in your open command prompt
iisreset
It will take a few minutes to completely shutdown and restart IIS - Once IIS has reset close the command prompt and test both your IPs in a web browser again, this time IIS should only display on a single IP address
Install and Configure Apache
For the installation of Apache you’re on your own. You can either install it from scratch or use one of the combined WAMP packages out there. Personally I use XAMPP as I am quite lazy and no longer have the time to manually install all the required components separately.
Once you have installed Apache, we need to bind it to the second, unused IP address
- Run notepad as an administrator using the method from step 1 above
- In Notepad click File –> Open and navigate to the folder Apache installed in. Within this folder select the ‘conf’ folder then open up the httpd.conf file (NOTE: make sure you have All Files (*.*) selected in the drop-down box at the bottom right otherwise you will not see the files)
- Locate the line
Listen 80
And change it to
Listen 192.168.1.110:80
Replacing 192.168.1.110 with the second IP you assigned to your machine.

- Save your changes then go to File –> Open and navigate to the ‘extras’ subfolder of the conf folder and open the httpd-ssl.conf file
- Locate the line
Listen 443
And change it to
Listen 192.168.1.110:443
Again replacing the IP address written here with your own

- Save your changes and start/restart Apache
You should now be able to view IIS on your original IP address and Apache on the new one you added. To get external access to Apache instead of IIS you would simply change the port forwarding rule for port 80 in your router to point to this new IP address instead of the original one.
Make sure that you do not change port forwarding for port 443 though as this will stop all remote access to email and other SBS 2008 services!
Sources
- http://www.simongibson.com/intranet/multiip/
- http://msdn.microsoft.com/en-us/library/ms733768.aspx
- http://weblogs.asp.net/steveschofield/archive/2007/07/06/iis7-post-44-iis7-and-apache-on-the-same-machine.aspx - Unfortunately I didn’t find Steve Schofield’s excellent guide on doing the same thing until after I had struggled through it all.


