Setting up Tomcat/Apache on IIS server on different IP, but both using port 80.

When you start (IIS) 6.0 on Microsoft Windows Server 2003, IIS binds to all IP addresses on the server, not just the IP addresses that are assigned to Web sites. This may be true even though you have set the metabase property DisableSocketPooling to True. DisableSocketPooling will work on IIS 5 , but not on IIS 6.

So to successfully allow applications to use the same port on different IP addresses, you must use utility, Httpcfg.exe. Httpcfg.exe is located on the Windows Server 2003 CD in the Support\Tools directory as part of the Support.cab file.

After you have installed the support tools from the CD,

  1. Open Command prompt
  2. Type the following, where xxx.xxx.x.x is the IP address you want to add:
    httpcfg set iplisten -i xxx.xxx.x.x
    When this succeeds, Httpcfg returns the following:
    HttpSetServiceConfiguration completed with 0

  3. After the IP address is added, use the following command to list it:
    httpcfg query iplisten
    Httpcfg returns the following:
    IP :xxx.xxx.x.x
  4. Stop the HTTP service and its dependent services. Type the following string at the command prompt:
    net stop http /y
  5. Restart the HTTP service and it dependent services. To do this, type the following string at the command prompt:
    net start w3svc
After this IIS will only bind to the addresses added to the list. Now you can configure IIS or any other webserver to use other IP's on the same port (80).

@man!

Phasellus facilisis convallis metus, ut imperdiet augue auctor nec. Duis at velit id augue lobortis porta. Sed varius, enim accumsan aliquam tincidunt, tortor urna vulputate quam, eget finibus urna est in augue.

No comments: