Instructions for integrating other versions of ServletExec and ArcIMS can be found here.
The instructions at this website are provided by New Atlanta Communications.
In addition to these instructions, Esri provides its own steps for installation and configuration of ServletExec and ArcIMS.
For ServletExec 5.0 AS for Apache 2.x on Windows and ArcIMS 9.0 click here.
Note: ServletExec 5.0 works fine with Apache 1.3.x, but if you want to use Apache 1.3.x with ArcIMS 9.0 and ServletExec, Esri may require you to use version 4.2 of ServletExec instead of version 5.0.
We say this because at the time of this writing, Esri did not offer any instructions for running SE 5.0/ArcIMS 9.0/Apache 1.3.x.
If using Apache 1.3.x, with ArcIMS 9.0, find out which versions of SE, that Esri will support.
From our standpoint, we see no reason why you could not use SE 5.0 with Apache 1.3.x as we have many, many non-ArcIMS customers who do this. But check with Esri to see if they will support this combination for use with ArcIMS 9.0.
A listing of all such Esri knowledge base articles can be found here.