One of the things that really bugs me about IIS is that you can't run multiple web sites under XP Pro. I guess Microsoft assumes "Pros" will have an XP Server box for every developer. This is the main reason I use Apache on my dev box and my laptop.
A coworker pointed me to an ISAPI filter called MultiSite. You can find it here. I haven't tried it yet, but it seems like the perfect solution.
Archived Comments
IIS (with or without this plugin) can't be a perfect solution. Apache is the way.
Well, I love Apache, especially it's URL Rewrite ability, but it has one HUGE issue for me. You can't override the 404 error for CFMs. What I mean is, if I request xxx.cfm, and it doesn't exist, I get CF's builtin 404 error. In IIS, I can tell it to check for script existence, and this allows me to properly trap 404 errors. I have yet to see a way for Apache to do this.
can't you simply have apache rewrite all .cfm requests within a site through a single .cfm file? I assume this is for a CMS or something similar.
That isn't a fix, that's a hack. Also, it won't work for existing sites. It should be rather simple. If someone request a file that does not exist, I should be able to trap the error. This is easily done in IIS. It is impossible in Apache, and I've yet to hear a good reason for it.
i just added:
ErrorDocument 404 template.cfm
and that seems to trap for missing .CFM's.
What version of Apache are you running? That has never worked for me.
1.3.26. My setup is kinda screwy (apache proxy to IIS, so I'm sticking CFMX 6.1 on a clean debian box to make sure. I've wanted to get this licked under *nix for a while.
I'm using 2.x, I bet that is the issue.
Here is my personal favorite:
http://www.firstserved.net/...
ok. the solution*:
1) Build apache (in this case 1.3.31) with mod_rewrite support:
$ ./configure --prefix=/path/to/apache \
--enable-module=rewrite \
--enable-shared=rewrite
$ make
$ make install
2) Add the appropriate LoadModule call to httpd.conf:
LoadModule rewrite_module libexec/mod_rewrite.so
3) make a directory off root (in this case "stuff"), and add an error handling template named error.cfm. I just stuck a <cfdump var="#cgi#"> in it.
4) make a .htaccess file with the following:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /stuff/error.cfm
5) restart apache and throw some urls at it.
6) Problems: All the CGI variables are blank. There should be some further fiddling with mod_rewrite which will let you copy over the various cgi setting, but that's for another night.
a mod to get the querystring:
Put this in .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /stuff/error.cfm?%{REQUEST_URI}
Thing is - though - wouldn't it be better to run on Apache 2.x? I always assume the latest and greatest version is the one to run.
i think it would work exactly the same on apache2. i think i was running 1.3.31 because something (php maybe but who knows) didn't like 2.0. You should be able to find your httpd binary and httpd -l to get a list of modules compiled into it. If mod_rewrite is in there, and you can located the .so somewhere, you should be in business out of the box.
See this is exactly what I have been saying for years with this Apache vs. IIS debate.
Did you noticed the solution that jared chandler wrote above for your template problem? Kinda of a monster isn't it.
All I know is when I'm developing I need to work, not screw around. IIS is simple to install and simple to get working. Apache has always been a PITA for me. If you don't compile it a certain way, stuff doesn't work. Want to add something, you need to compile it again with the module. With IIS you can simply add the filter.
Personally I don't have a problem with the multiple site issue. I have a copy of Win2K Server (and yes I bough it) running in a VMWARE (bought that too) virtual machine on my WINXP box.
One thing I can't understand is why Apache has a old style config file and no "gui" admin interface. (I figure it has a nice GUI admin interface... can anyone suggest one?)
John Farrar
balthor, that firstServed iis admin tool you posted the link for looks great. I'd just hit this problem on a new xp-pro install so this is timely advice. I particularly like its ability to set up multiple sites, then stop and start each with a little taskbar control app. Neat!