My local fire department is interested in redoing their web presence entirely. I'm all game to help with that, but they also need some emergency help because their current application is flat out broken. This means actually diving into their current code, and stabilizing it before we even talk about moving to a more current platform (cough...Ruby on Rails...).
Having been part of these rescue missions before, I know that the problems are usually deeper than the description: "there's just a few things that need tweaking and fixing, no big deal really". In anticipation of this, I've already taken the code I copied off of their production server (yes, some organizations still do this), put it into a git repo, and checked it out to 2 separate computers.
The further complication? The entire app is in classic ASP. And all three of my computers are Macs.
But I'm not the last person who will ever have this problem, so we're going to follow along as I get this dinosaur up and running here on my OS X 10.6 Macbook Pro.
1) Download and Install the Mono Framework
Mono is basically an open source implementation of the .NET Framework. If you want to know more than that, checkout mono-project.com. For now, just know that you need this if you want to run an ASP application on your Mac, and you can download the latest version here. The dmg file has a package installer inside of it, and it should run just fine with the default configuration.
2) Download and Install the Mono CSDK
This is available from the same page, and is actually the link just to the RIGHT of the link for downloading the framework itself. I'd be lying if I said I knew what this was, but many people have said in the forums that it's necessary. :)
3) Download MonoDevelop and copy .app file to the Applications folder
MonoDevelop is a development environment for the .NET framework that you can run on a mac.
4) Forget everything about steps 1-3...
...when you realize that Mono isn't going to be much help running Classic ASP, which is not on the .NET framework.
5) find Apache::ASP
Sweet! Execute your classic ASP in Perl with http://www.apache-asp.org/
6) Make sure Apache is installed with mod_perl
If you're on a Mac, it's already there. Just add this to your httpd.conf:
LoadModule perl_module libexec/apache2/mod_perl.so
and add a perl.conf file to apache's "other" directory to allow the execution of perl scripts:
<ifmodule perl_module="">
AddHandler cgi-script .pl
<ifmodule dir_module="">
DirectoryIndex index.pl index.html
</ifmodule>
</ifmodule>
7) download and install the latest Apache::ASP
tar file can be found here. I used 2.6.1.
First, edit your httpd.conf file again:
<directory $document_root="" asp="" eg="">
Options FollowSymLinks
AllowOverride All
</directory>
Then, in the root directory of the Apache::ASP download, run the following:
perl Makefile.PLWhich will tell you if you're missing any modules. I had to install MLDBM::Sync.
From there you can do your make process like any other:
make make test make install
8) test to make sure you can run an ASP script
With these steps in place, you should now at least be able to debug your inherited Classic ASP application on your Mac. Now, hurry up and rewrite it on a better platform!

4 comments:
I wasn't able to get this up and running but then again I am little light where sever administration is concerned. Any thoughts on how to get this up and going with Phusion Passenger running? Also, I am clueless as to where the $Document_Root should be located... I imagine the /Sites directory. Nice post, Thanks.
Cough.. Python/ruby are slower than Java, which is slower than .Net so there goes performance out the window & we have not touched on memory costs. Hardware is cheap compared to engineering talent.. of which the gap between available.Net resources available, compared to the minority clique of ruby developer resources, begs the question are you really doing your community a major injustice just so you can use an experimental language that is in no way enterprise ready or designed for scaling to the task?
Ruby is useful for back office build automation & server side 'functional' programming tasks and was never intended for high performance dynamic web site delivery. I've seen people waste tons of time & money trying to replicate what PHP / Java / .Net all do very well and fail in the most spectacular fashion. So why not save everyone the headache's and take 30 minutes to set them up with a Drupal cms, which is PHP and super easy to modify and work with?
The upside of this is there are multinational companies using PHP in production sites, heaps of developer resources to work on with mods as needed later on when your jet setting around the world for the demand for your spectacular rare talent for building control/build frameworks in Ruby or perhaps by then even.. cough.. Python!
Have a look at ActiveState Komodo if you want a cross platform ide that supports all languages I've mentioned, except .Net but really there is MonoDevelop or Visual Studio for that and IKVM is naturally a great choice for porting .Net / Java but lacking the finesse of being dynamically typed. Which is irrelevant as all your local charity work requires is Drupal, Joomla! or even WordPress. For the sake of sense don't abandon reason or logic in your community.
Opinions are one thing, you may have the opinion that PHP would be a better fit, that's certainly tenable and defensible, and we could have a discussion; to say that a CMS might be a better fit than a web application is also a defensible opnion.
But to say that ruby is a an experimental language that is not enterprise ready is making me laugh so hard I can't take you seriously. Troll somewhere else, you'll not get a rise out of me. :)
from step 7, where do i install the Apache-ASP 2.6.1?
Post a Comment