See below -----Original Message----- From: Russ [mailto:[EMAIL PROTECTED] Sent: Friday, 19 January 2007 22:42 To: CF-Talk Subject: RE: Apache config
> -----Original Message----- > From: Dave Watts [mailto:[EMAIL PROTECTED] > Sent: Friday, January 19, 2007 9:29 PM > To: CF-Talk > Subject: RE: Apache config > > > I completely disagree with that statement. Ease of use has > > (nearly) nothing to do with how good or bad a particular product is. > > That is an absurd statement on its face. Ease of use may not be the > most important factor in judging the quality or value of something, > but it is an important factor. If it weren't, you'd be running OS/2 on > your computer and listening to your Archos music player as you write > applications in C with edlin. Windows is easy to use, yet people use linux for a lot of things. Linux is a lot harder to use, but it's also more stable and has less security holes. Also if you don't need commercial support, Linux is free, while windows is $600+ license per box. *********************** That is not entirely true. It's a lot easier to create an more insecure and less stable Linux install than it is to create a less stable and less secure windows install. That is one of the biggest myths out there... *************************** > > > Anyhow my point is that people cannot be afraid to learn something > > new just because there is a learning curve involved. > > I am sure it has taken everyone here that uses IIS quite awhile to > > learn it in the beginning. > > That might all be true, but all other things being equal, something > that is easy to use is better than something that isn't. And, frankly, > if you assert that product X "beats the pants off" product Y, I'm > going to expect product X to be easier to use. I think, for example, > that CF beats the pants off of JSP. Why? Ease of use! > CF beats the pants off JSP because it makes web development easier and faster. We like CF because that's what we do most of the time, and we would rather it be something that we can be more productive in. If I only needed to use CF once a month, and I could use JSP for free, and I knew JSP well enough, I would probably pick JSP. It's most likely faster anyway. Apache lets you keep the .conf file in a source control system like subversion. It lets you easily copy and paste and create new configurations. I can set up a template for new virtual sites and have CF automatically create a new conf file, and do a graceful restart on apache and voila, I have a new site set up. To do so with IIS would be a lot harder and would probably involve some convoluted API calls, which you can't do from CF anyway. > The .conf file situation in Apache HTTPD has always been a big pile of > crap. > You might find this, written by an Apache developer, illuminating. Or > maybe > not: > > http://people.apache.org/~rbowen/presentations/apacheconEU2005/hate_ap > ache > .pdf > > It's a little out of date, but still entertaining. I agree it is out of date, and a bunch of things have been fixed especially with the 2.0 version. The plain truth is that Apache is just better. There are things you can do with apache out of the box that you would either need to buy custom ISAPI filters for, which would probably crash half the time, since they're made by some one man companies, and are not open source for many developers to work on and fix. There are also things that you just can't do with IIS, to my knowledge. For example, let's say you want to set up a SES url, something like http://www.example.com/AboutUs and you want that url to go to http://www.example.com/index.cfm?page=AboutUs There is no way to currently do that with IIS AFAIK. With apache it's a simple rewrite directive: RewriteCond %{HTTP_HOST} ^.*example.com $ [NC] RewriteCond %{REQUEST_URI} ^/(.*) $ [NC] RewriteRule ^(.*)$ http://www.example.com/index.cfm?page=%1 [P] *************************** Apache 2 is a definite improvement...I will give you that. I do like how they have the site-enabled and sites-available folders to manage VH. As far as rewrites...that's a bad example. Able Commerce uses the same file in Apache that it uses in IIS to handle rewrites. It uses XML files and Java in the CF WEB-INF directory to handle it. It will take a url like http://www.mydomain.com/product.cfm?cat_id=1&product_id=50 into http://www.mydomain.com/x500_modem1_50.cfm It adds the following to the web.xml... <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <filter> <filter-name>UrlRewriteFilter</filter-name> <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-cla ss> </filter> <filter-mapping> <filter-name>UrlRewriteFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> Here is the file itself... <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 2.3//EN" "http://tuckey.org/res/dtds/urlrewrite2.3.dtd"> <!-- Configuration file for UrlRewriteFilter http://tuckey.org/urlrewrite/ --> <!-- This is the configuration file for URLRewriter used by Ablecommerce 5.5x. Ablecommerce uses URLRewrite filter to provide friendly URLs for your store. You can do a lot of other stuff with URLRewriter. For more details refer to http://tuckey.org/urlrewrite/ ==== The following comments were added by Stephen Rogers ==== If you wish to limit the domains and/or IP's in this servlet context, you will need to un-comment the <condition> elements for each rule below and edit their values for your particular situation. You can specify multiple domains/IPs for each rule using the next="or" attribute. By default, all domains's URLs are filtered, and the regex pattern matching for the <from> element is case-insensitive. Domain/IP Filtering Example: <condition name="host" operator="equal" next="or">www.mystore1.com</condition> <condition name="host" operator="equal" next="or">www.mystore2.com</condition> <condition name="host" operator="equal">www.mystore3.com</condition> --> <urlrewrite> <rule> <!--<condition name="host" operator="equal" next="or">ServerIPAddress</condition>--> <!--<condition name="host" operator="equal">www.mystore.com</condition>--> <from>([^\?]*)/[^\?]*_C(\d*)\.cfm(?:\?(.*))?</from> <to>$1/category.cfm?Category_ID=$2&$3</to> </rule> <rule> <!--<condition name="host" operator="equal" next="or">ServerIPAddress</condition>--> <!--<condition name="host" operator="equal">www.mystore.com</condition>--> <from>([^\?]*)/[^\?]*_P(\d*)\.cfm(?:\?(.*))?</from> <to>$1/product1.cfm?Product_ID=$2&$3</to> </rule> <rule> <!--<condition name="host" operator="equal" next="or">ServerIPAddress</condition>--> <!--<condition name="host" operator="equal">www.mystore.com</condition>--> <from>([^\?]*)/[^\?]*_P(\d*)C(\d*)\.cfm(?:\?(.*))?</from> <to>$1/product1.cfm?Product_ID=$2&Category_ID=$3&$4</to> </rule> <rule> <!--<condition name="host" operator="equal" next="or">ServerIPAddress</condition>--> <!--<condition name="host" operator="equal">www.mystore.com</condition>--> <from>([^\?]*)/[^\?]*_W(\d*)\.cfm(?:\?(.*))?</from> <to>$1/webpage.cfm?Webpage_ID=$2&$3</to> </rule> <rule> <!--<condition name="host" operator="equal" next="or">ServerIPAddress</condition>--> <!--<condition name="host" operator="equal">www.mystore.com</condition>--> <from>([^\?]*)/[^\?]*_W(\d*)C(\d*)\.cfm(?:\?(.*))?</from> <to>$1/webpage.cfm?Webpage_ID=$2&Category_ID=$3&$4</to> </rule> <!-- INSTALLATION in your web.xml add... <filter> <filter-name>UrlRewriteFilter</filter-name> <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-cla ss> <init-param> <param-name>logLevel</param-name> <param-value>WARN</param-value> </init-param> </filter> <filter-mapping> <filter-name>UrlRewriteFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> EXAMPLES Redirect one url <rule> <from>/some/old/page.html</from> <to type="redirect">/very/new/page.html</to> </rule> Redirect a directory <rule> <from>/some/olddir/(.*)</from> <to type="redirect">/very/newdir/$1</to> </rule> Clean a url <rule> <from>/products/([0-9]+)</from> <to>/products/index.jsp?product_id=$1</to> </rule> eg, /products/1234 will be passed on to /products/index.jsp?product_id=1234 without the user noticing. Browser detection <rule> <condition name="user-agent">Mozilla/[1-4]</condition> <from>/some/page.html</from> <to>/some/page-for-old-browsers.html</to> </rule> eg, will pass the request for /some/page.html on to /some/page-for-old-browsers.html only for older browsers whose user agent srtings match Mozilla/1, Mozilla/2, Mozilla/3 or Mozilla/4. --> </urlrewrite> Ok, maybe not so simple, but once you get the hang of it, you can feel the power. Just like using linux for servers instead of windows. It takes time to learn how to administer it, but once you do, you'll never go back. For one thing you won't have to worry about monthly security patches. They silently download at night without ever needing a reboot. My Linux server has been up for 91 days. People have their servers up for years at a time without rebooting. Can you say the same about windows? ******************* Yes I can...when I worked at the AMA, the only time we ever had to take a server down was to apply a major patch. With 2000, most of the patches didn't require a reboot. We had uptimes of over a year...and these were NT 4.0 boxes. Mostof the time when you have an unstable box, it's because of some screwy software that got installed by one of the admins or someone else that has admin access to the box. Same holds true on Linux. I have used both and I gretly prefer IIS...mainly because of it's ease of use. ******************* Russ http://www.ruslansivak.com P.S. Did I mention that once you learn apache, your skills (and config files) will transfer almost seamlessly to another OS? If you decide to use Linux later, you can use your apache skills. If you keep using IIS, it'll be that much harder to make the move to Linux later. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267097 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

