Posts Tagged ‘IIS’

Hosting Multiple SSL Sites with IIS6

// July 16th, 2008 // 1 Comment » // Programming

A simple tip I came across when hosting multiple sites on a server.

It’s easy to assign a new ip address to the adapter, but creating a new ip address per website is a bit much.

I like to, where possible, use host-headers when hosting a website. Host headers across SSL are now supported by IIS6 (in Windows 2003 RC2).

  1. Start > Run > type “cmd”, press Enter.
  2. Paste… cd c:\inetpub\adminscripts\ into the command prompt …and press Enter.
  3. Paste… cscript.exe adsutil.vbs set /w3svc/{siteid}/SecureBindings ":443:{url}" …into the command prompt. You’ll need to replace {siteid} and {url}.

You can find the SiteId in IIS when looking at the list of websites. For example, I have a SiteId of “87257621” and url of “www.robertbeal.local” (this url points at 127.0.0.1 in my windows/system32/drivers/etc/hosts file).

Caching CSS & JavaScript using Rewrite Rules in IIS6

// April 4th, 2008 // 2 Comments » // Programming

Recently I’ve been working on improving the caching within the website at Huddle to improve performance for users. After reading around, I found the following rules to be valuable.

  • Cache your CSS and JavaScript forever (set a long, long expiry)
  • Handle updates by changing the URL of your CSS and JavaScript

When caching “forever” the main problem is if you release an update to “styles.css” the browser caches the URL of that file, but won’t pick up any future updates unless the user clears their browser cache (you don’t want to have to tell people to “Ctrl + F5″). By changing the URL of the file, the browser thinks it’s requesting a new file, and your updates get applied. But how do you go about doing this without it becoming a pain to manage?

(more…)