<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ShaneWelldon.com &#187; SBS2008</title>
	<atom:link href="http://www.shanewelldon.com/tag/sbs2008/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shanewelldon.com</link>
	<description>Hints and Tips for Obscure Issues</description>
	<lastBuildDate>Fri, 29 May 2009 15:25:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apache and IIS7 Together on SBS2008</title>
		<link>http://www.shanewelldon.com/2009/02/04/apache-and-iis7-together-on-sbs2008/</link>
		<comments>http://www.shanewelldon.com/2009/02/04/apache-and-iis7-together-on-sbs2008/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 04:42:08 +0000</pubDate>
		<dc:creator>Shane Welldon</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[SBS2008]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shanewelldon.com/?p=67</guid>
		<description><![CDATA[A guide to getting Apache running on a Small Business Server 2008 machine alongside IIS 7.]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>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.</p>
<p>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.</p>
<h2>Add a Second IP Address</h2>
<ol>
<li>Login to your server’s desktop and click Start –&gt; Control Panel then open Network and Sharing Center and click Manage Network Connections under Tasks in the left panel</li>
<li>Right-click the machine’s network adapter and click Properties, clicking Continue on the UAC prompt if enabled</li>
<li>In the list select Internet Protocol Version 4 (TCP/IPv4) and click the Properties button</li>
<li>In the Properties dialog click the Advanced… button down the bottom-right</li>
<li>On the IP Settings tab click the Add… button in the IP addresses grouping</li>
<li>Enter the new IP address of your choice and the required Subnet mask then click Add</li>
<li>You should now have two IP addresses assigned to your machine. Click OK or close all open dialogs and windows</li>
</ol>
<p><a rel="lightbox" href="http://www.shanewelldon.com/wp-content/uploads/2009/02/sbs2008secondipaddressmarked.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="sbs2008-second-ip-address-marked" src="http://www.shanewelldon.com/wp-content/uploads/2009/02/sbs2008secondipaddressmarked-thumb.png" border="0" alt="sbs2008-second-ip-address-marked" width="403" height="480" /></a></p>
<h2>Bind IIS to a Single IP Address</h2>
<p>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).</p>
<ol>
<li>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</li>
<li>In the command prompt type the following:<br />
<code>netsh http show iplisten</code><br />
The list returned should be empty</li>
<li>In the command prompt type:<br />
<code>netsh http add iplisten ipaddress=192.168.1.100</code><br />
Replacing 192.168.1.100 with the existing IP address of your machine</li>
<li>Type out the show command from step 2 a second time and you should see your IP address in the list</li>
<li>Reboot the IIS services by typing the following in your open command prompt<br />
<code>iisreset</code><br />
It will take a few minutes to completely shutdown and restart IIS</li>
<li>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</li>
</ol>
<h2>Install and Configure Apache</h2>
<p>For the installation of Apache you’re on your own. You can either install it from scratch or use one of the combined <a href="http://en.wikipedia.org/wiki/Comparison_of_WAMPs">WAMP</a> packages out there. Personally I use <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a> as I am quite lazy and no longer have the time to manually install all the required components separately.</p>
<p>Once you have installed Apache, we need to bind it to the second, unused IP address</p>
<ol>
<li>Run notepad as an administrator using the method from step 1 above</li>
<li>In Notepad click File –&gt; 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)</li>
<li>Locate the line<br />
<code>Listen 80</code><br />
And change it to<br />
<code>Listen 192.168.1.110:80</code><br />
Replacing 192.168.1.110 with the second IP you assigned to your machine.<br />
<a rel="lightbox" href="http://www.shanewelldon.com/wp-content/uploads/2009/02/sbs2008apachelistenstringmarked.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="sbs2008-apache-listen-string-marked" src="http://www.shanewelldon.com/wp-content/uploads/2009/02/sbs2008apachelistenstringmarked-thumb.png" border="0" alt="sbs2008-apache-listen-string-marked" width="490" height="120" /></a></li>
<li>Save your changes then go to File –&gt; Open and navigate to the ‘extras’ subfolder of the conf folder and open the httpd-ssl.conf file</li>
<li>Locate the line<br />
<code>Listen 443</code><br />
And change it to<br />
<code>Listen 192.168.1.110:443</code><br />
Again replacing the IP address written here with your own<br />
<a rel="lightbox" href="http://www.shanewelldon.com/wp-content/uploads/2009/02/sbs2008apachelistensslstringmarked.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="sbs2008-apache-listen-ssl-string-marked" src="http://www.shanewelldon.com/wp-content/uploads/2009/02/sbs2008apachelistensslstringmarked-thumb.png" border="0" alt="sbs2008-apache-listen-ssl-string-marked" width="486" height="106" /></a></li>
<li>Save your changes and start/restart Apache</li>
</ol>
<p>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.</p>
<p>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!</p>
<h4>Sources</h4>
<ul>
<li><a href="http://www.simongibson.com/intranet/multiip/">http://www.simongibson.com/intranet/multiip/</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/ms733768.aspx">http://msdn.microsoft.com/en-us/library/ms733768.aspx</a></li>
<li><a href="http://weblogs.asp.net/steveschofield/archive/2007/07/06/iis7-post-44-iis7-and-apache-on-the-same-machine.aspx">http://weblogs.asp.net/steveschofield/archive/2007/07/06/iis7-post-44-iis7-and-apache-on-the-same-machine.aspx</a> - Unfortunately I didn&#8217;t find Steve Schofield&#8217;s excellent guide on doing the same thing until after I had struggled through it all.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.shanewelldon.com/2009/02/04/apache-and-iis7-together-on-sbs2008/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

