Ten Things to do with IIS (from codeproject website)

zhaozj2021-02-16  57

Introduction

As an IIS administrator it sometimes gets downright annoying having to fend off all the insults from Apache admins I meet, claiming innate server superiority. Generally the discussion about Web administration starts first with all the various security holes plaguing IIS and the negative press the platform garnered over the last year. Then it invariably moves to a discussion about how Netcraft and other stats sites show Apache as the dominant server on the Web, or how a certain big site uses Apache, or how there are so many cool modules to add to Apache . Pointing Out That SCADS of Non-Identified Corporate In-House Servers Run Iis, Or That Too Is A Free Server (Since It Comes with the Operating System), or That There in Fact Plenty Of Cool Add-Ons for IIS including many that provide source code) - all this does little to dissuade these server chauvinists of their opinion Rather than whining about rude Apache admins, however, I thought it would be a more useful response simply to. Write Down Some of The Ways Iis'VE Found of Improving Iis. So WITHOUT FURTHER Delay Here is MY TOP TEN TIPS for MAKING The MOST OF Your IIS.

TIP 10: Customize Your Error Pages

Although this is quite simple to do, few people seem to take advantage of it. Just select the "Custom Errors" tab in MMC and map each error, such as 404, to the appropriate HTML or ASP template. Full details can be found here ................... ..

TIP 9: Dive Into the Metabase

If you think Apache is powerful because it has a config file, then take a look at the MetaBase You can do just about anything you want with IIS by editing the MetaBase For example, you can create virtual directories and servers;.. Stop, start and pause Web sites; and create, delete, enable and disable applications.Microsoft provides a GUI utility called MetaEdit, somewhat similar to RegEdit, to help you read from and write to the MetaBase Download the latest version here But to really impress those.. UNIX admins - and to take full advantage of the MetaBase by learning how to manipulate it programmatically -. you'll want to try out the command-line interface, officially called the IIS Administration Script Utility Its short name is adsutil.vbs and you ' LL Find IT IN C: / INETPUB / Adminscripts, or else In% SystemRoot% / System32 / InetsRV / Adminsample, TOGETHER WITH A HOST OF Other USEful Administrative Scripts.

A Word of Caution Though: Just Like Apache Conf Files, The Metabase IS Pretty Crucial To The Function of Your Web Server, So Don't Ruin It. Back IT Up First.

TIP 8: add spell checking to your urls

Apache folks always brag about cool little tricks that Apache is capable of -. Especially because of the wealth of modules that can extend the server's basic functionality One of the coolest of these is the ability to fix URL typos using a module called mod_speling Well,. thanks to the folks at Port80 Software, it now appears that IIS admins can do this trick too, using an ISAPI filter called URLSpellCheck. You can check it out right on their site, by trying URLs like www.urlspellcheck.com/fak.htm , www.urlspellcheck.com/faq1.htm - or any Other Simple Typo You Care To Make.

TIP 7: Rewrite your URLS

Cleaning your URLs has all sorts of benefits - it can improve the security of your site, ease migration woes, and provide an extra layer of abstraction to your Web applications Moving from a ColdFusion to an ASP based site, for example, is no big. deal if you can remap the URLs Apache users have long bragged about the huge power of mod_rewrite -.. the standard Apache module for URL rewriting Well, there are now literally a dozen versions of this type of product for IIS - many of them quite a bit easier to use than mod_rewrite, which tends to presume familiarity with regular _expression arcana Check out, for example, IIS ReWrite or ISAPI ReWrite So brag no more, Apache partisans.Tip 6:.. Add browser detection

There are a lot of ways to build Web sites, but assuming everybody has a certain browser or screen size is just plain stupid. Simple _JavaScript sniff-scripts exist for client-side browser detection, but if you are an IIS user you can do better with a product called BrowserHawk from cyScape. The Apache world does not really have something comparable to this popular, mature and well-supported product. Speaking of cyScape, they've recently added an interesting-looking related product called CountryHawk that helps with location Detection, But So Far I Haven't Had The Language- Or Location-Sensitive Content To Warrant Trying It out.

Tip 5: Gzip Site Content

Browsers can handle Gzipped and deflated content and decompress it on the fly While IIS 5 had a gzip feature built-in, it is pretty much broken Enter products like Pipeboost to give us better functionality -.. Similar to what Apache users have enjoyed with mod_gzip . Don't wait you bandwidth - Even Google Encodes ITS Content, And Their Pages Are Tiny.tip 4: Cache Your Content

While I'm on the topic of improving performance, remember to make your site cache friendly. You can set expiration headers for different files or directories right from the MMC. Just right click on item via an the IIS MMC, flip to the "HTTP headers "tab, and away you go If you want to set cache control headers programmatically -. or even better, let your site developers do it - use something like CacheRight If you want to go further and add reverse proxy caching, particularly for generated. Content, Use a Product Like Xcache - Which Also throws in compression.

It might involve more time and expense to take full advantage of caching, but when you watch your logs shrink because they do not contain tons of pointless 304 responses, and your bandwidth consumption drop like a stone, even while your total page views increase over . the same period, you'll start to understand why this particular tip was so important Cache friendly sites are quite rare, but there is plenty of information available online about the enormous benefits to be had by doing it right: Check out Brian Davidson's page This Nifty Tutorial from Mark NOTTINGHAM, AND What AOL HAS TO SAY ON The Subject.

TIP 3: Tune Your Server

Tuning IIS is no small topic -.. Whole books and courses are dedicated to it But some good basic help is available online, such as this piece from IIS guru Brett Hill, or this Knowledge Base article from Microsoft itself However, if you don ' t feel like getting your hands dirty - or can not afford the time and expense of turning yourself into an expert - take a look at XTune, from the makers of XCache It's performance tuning wizards step you through the process of tuning your IIS environment. , Making Expert Recommendations Along The Way..tip 2: Secure Your Server with Simple Fixes

Sure people are going to attack sites, but you do not have to be a sitting duck if you're willing to make even a small effort. First off, do not advertise the fact that you are running IIS by showing your HTTP server header Remove or replace it using something like ServerMask -.. probably the best twenty-five bucks you'll ever spend you can go farther than this by removing unnecessary file extensions to further camouflage your server environment, and scanning request URLs for signs of exploits . There are number of commercial products that do user input scanning, and Microsoft offers a free tool called URLScan which does the job. URLScan runs in conjunction with IISLockDown, a standard security package which should probably be installed on every IIS server on the planet. Thase Are Simple Fixes That Could Pay Off Big, So Do Them Now.

TIP 1: Patch, Patch, Patch!

Okay, we in the IIS world do have to patch our systems and make hotfixes. However, as a former Solaris admin I had to do the same thing there, so I am not sure why this is a big surprise. You really need to keep Up with the patches, microsoft is of course the definitive source, but if you can also use the highly-regarded www.cert.org. Simply search on "IIS" .conclusion

Well there you have it: 10 tips for IIS admins to improve their servers Some of the tips might become obsolete once IIS 6 is gold, but, for now at least, W2K and NT IIS admins should apply a few of these today and sleep. A little better at night.

Matt foley is a former solaris sysadmin who was turned to the "dryside" and is now Works for a large southern california hosting and web agency. He Quite Likes Windows Now In Spite of Himself

转载请注明原文地址:https://www.9cbs.com/read-20372.html

New Post(0)