I did figure out what I needed based on what you guys have said. And yes
IIS does bind to all addresses.
Apache does the same thing by default but if you add the address into the
connector line it will only bind to that address. That takes care of the
Apache issue.
But IIS will connect to all addresses even if you specifically set each
website to be a different address. In our case, if we set up 10 addresses
on the Nic card and set up our 4 web sites to access 4 of the address, it
will still grab all the addresses - preventing Apache from running. If we
manually start Apache to grab one of the addresses not used by IIS first
(from the Services window) and then start IIS - IIS will fail. The web
server will show as started but it won't handle any of the pages.
The solution, apparently (am in the process of testing and I believe it will
work) is a program from MS called httpcfg.exe which you can run to set up a
listener list. I assume what happens is that IIS will look for a listener
list and if it finds it, it will only bind to the addresses on the list. If
there is no list it will bind to all addresses. So in my case, I will put
all the address except the one that Apache will use and that will solve the
problem. It doesn't matter what order they start in as IIS won't even look
at the Apache address.
I am not sure what they did before W2K3 and XP SP2 as I believe it came out
then and I don't believe works for IIS5.
Wish me luck and thanks,
Tom
"Ben Voigt" <rb*@nospam.nos pamwrote in message
news:eN******** ******@TK2MSFTN GP02.phx.gbl...
>
"tshad" <ts**********@f tsolutions.comw rote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>>I have been trying to run IIS and Apache Tomcat on the same Server using
the same Port (80 for http and 443 for https). I am trying to do this by
using multiple IP address on the same Nic card. This would allow me
multiple sockets for the same port.
With all my research it seems that most services seem to listen on ALL IP
addresses on the same machine for a particular port (25 SMTP, 53 DNS, 80
HTTP). I found you can tell IIS NOT to listen to a particular IP Address
which would allow Apache to connect to that IP Address and listen to 80
and 443 at the same time as IIS.
What I don't know is if this is normal. I did add another IP Address to
my Nic card and tried to do a "telnet address port" for all the ports
open on my machine. They were ALL open for both addresses. I thought
that when you created a service to listen on a port you had to give it an
IP Address and Port Number to create a socket.
You do. If you use the special address INADDR_ANY, you get bound to all
ports.
>>
If you create a service, is it going to listen on all IP Addresses?
At the programmer's discretion.
Also, you can typically bind using a particular IP even when the port is
already opened using INADDR_ANY (because IP != INADDR_ANY, you won't get
the address in use error). The more specific bind takes precedence.
>>
Thanks,
Tom