Link to home
Start Free TrialLog in
Avatar of gatorIT
gatorIT

asked on

IIS httpcfg

Trying to use multiple services that both use TCP 80 and 443 - but on two different IP addresses.  

One is IIS6.

I thought this would be a simple command to stop IIS from listening on all IPs (0.0.0.0:80 & 443) to just the single public address.
httpcfg set iplisten –I xxx.xxx.x.x:y

Tried that and although IIS would start, none of the sites were able to start.  

What am I missing?





Avatar of Nightman
Nightman
Flag of Australia image

You can configure IIS to listen on only one IP address (in fact, you can even do this per web site). Select the web site, properties, on the first tab change IP Address from 'All unassigned' to the IP address you want (and as I said, you can actually do this per site).

For port 443 on that IP, ensure that no other services are using it.
Avatar of gatorIT
gatorIT

ASKER

I'm sorry I failed to mention that I have triple checked that there are no sites (including all host headers and SSL) set to 'All Unassigned'.

When I added the appropriate entries with httpcfg, IIS would start but none of the sites would go to Running status.

Actually I just realized what the problem was....

I added an IP address with httpcfg that isn't bound to any interfaces.  I have several IPs, most of which are on the same subnet, but a couple are not, so in haste I added all IPs via httpcfg on the same subnet.

The following event was thrown:
"Unable to bind to the underlying transport for xxx.xxx.xxx.xxx:80. The IP Listen-Only list may contain a reference to an interface which may not exist on this machine.  The data field contains the error number."



Ahh - error logs are a wonderful thing ;)
Avatar of gatorIT

ASKER

Actually, the problem ended up being that it didn't like specifying the ports in the httpcfg command.

httpcfg set iplisten -i xxx.xxx.xxx.xxx
(without :y where y is the port)

Works just fine.



ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial