Archive | February, 2009

Tags: , , , , ,

Apache and IIS7 Together on SBS2008

Posted on 04 February 2009 by Shane Welldon

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

  1. 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
  2. Right-click the machine’s network adapter and click Properties, clicking Continue on the UAC prompt if enabled
  3. In the list select Internet Protocol Version 4 (TCP/IPv4) and click the Properties button
  4. In the Properties dialog click the Advanced… button down the bottom-right
  5. On the IP Settings tab click the Add… button in the IP addresses grouping
  6. Enter the new IP address of your choice and the required Subnet mask then click Add
  7. You should now have two IP addresses assigned to your machine. Click OK or close all open dialogs and windows

sbs2008-second-ip-address-marked

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).

  1. 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
  2. In the command prompt type the following:
    netsh http show iplisten
    The list returned should be empty
  3. 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
  4. Type out the show command from step 2 a second time and you should see your IP address in the list
  5. 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
  6. 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

  1. Run notepad as an administrator using the method from step 1 above
  2. 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)
  3. 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.
    sbs2008-apache-listen-string-marked
  4. 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
  5. 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
    sbs2008-apache-listen-ssl-string-marked
  6. 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

Comments (3)

Tags: , ,

Taming an iTunes Library Larger than your iPod

Posted on 04 February 2009 by Shane Welldon

iTunes has some really advanced features for organising your music but seems to ignore the fact that a lot of people may have music libraries larger than their iPod. Its solutions of only adding manually chosen playlists or randomly selecting music itself to go onto the iPod aren’t very helpful for people who still want the majority of their library accessible on the go or want more control over the music on their iPod.

My solution is to create a master live updating ‘smart playlist’ for the iPod which ignores songs that have been tagged with iTunes Only in the Grouping field, unless they have a rating of higher than one star. The reason for the second condition is that it allows me to tag entire albums as iTunes Only but still have single songs off them show up on the iPod if I rate them.

The advantage of doing it this way is that new content you put into iTunes will still automatically get added to the iPod unless you tell it not to.

Create an iPod Master Playlist

  1. In iTunes go to File –> New Smart Playlist…
  2. Add the rule ‘Grouping does not contain iTunes Only’
  3. Optionally add another rule ‘Rating is greater than one star’ and change the Match rule at the top to ‘any’
  4. Make sure Live updating is checked, and the Limit and Match only… options are unchecked
  5. Click OK and name your playlist ‘iPod’

itunes-ipod-smart-playlist

Tag Selected Songs with ‘iTunes Only’

  1. In your iTunes library, select the song(s) you don’t want on your iPod.
  2. Right-click and select Get Info
  3. On the Info tab, go down to the Grouping field and enter ‘iTunes Only’

itunes-get-info-grouping-field

Instruct your iPod to Sync with the iPod Playlist

  1. Connect your iPod to your PC
  2. Select your iPod under Devices on the left
  3. From the iPod Summary screen, select the Music tab
  4. Make sure Sync Music is checked then click the Selected Playlists radio button
  5. Select your iPod playlist in the list and any others you decide you want on your iPod, click Apply in the bottom right then click Sync

Now you can easily select what songs you do or don’t want on your iPod.

Comments (1)