IIS and apache on same machine with different IP

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,103
126
I need some help.

I'm setting up apache server on Windows 2003 Server with IIS 6 running.

The network card has 2 IPs
<<DNS name: srv IP = 192.168.1.8
<<DNS name: hub IP = 192.168.1.6

I configured IIS so the default website and all other website running under IIS listen only
on port 80 at IP 192.168.1.8.

I setup apache and changed httpd.conf its listen IP and port like this

httpd.conf under \apache\conf directory
-----------------------------------------
Listen 192.168.1.6:80


httpd-ssl.conf under \apache\conf\extra directory
--------------------------------------------------
Listen 192.168.1.6:443

I found if I want to run apache, then I have to stop default website and companyweb on IIS,
if I run Default web site and companyweb, then I am not able to start apache, why?

I already put apache and IIS on different IP, why do they still conflict with each other?


IIS
--------------------------------------------------------------------------------------------------------------------------
Description Identifier State IP address Port SSL Port Status
--------------------------------------------------------------------------------------------------------------------------
<<Default Web Site 1 Stopped <<192.168.1.8 80 443
SharePoint Administration 2 Running 192.168.1.8 8381
WSUS Administration x Running 192.168.1.8 8530 8531
SharePoint Administration 3 Running 192.168.1.8 8081
<<companyweb 4 Stopped <<192.168.1.8 80 444

Thanks.


By the way, I don't want to change http port from default 80 for IIS or apache
 

Jamsan

Senior member
Sep 21, 2003
795
0
71
By default, IIS takes every IPs port 80, even if you've only specified each of the websites to have a single IP. You'll need to do the following:

1) Get httpcfg.exe (it's on the Windows 20003 CD, or google it).
2) Type the following in a command prompt to stop all IIS services: net stop http /y
3) Stop Apache service (don't know enough about apache to give you the correct command)
4) Use httpcfg to configure IIS to only listen on the IP you want it to (type at a cmd prompt, in the directory httpcfg is in): httpcfg set iplisten -i 192.168.1.8
5) Restart IIS Services: net start w3svc
6) Restart Apache service (again, don't know enough about apache to give you the command)

Should do the trick.

Edit: After step 4, run the following: httpcfg query iplisten

Make sure only the IP address you wanted listed shows up. If others still do, use httpcfg delete iplisten -i 192.168.1.x to delete the entry
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,103
126
Hi Jamsan:

Thanks for your great instruction! I followed your instruction step by step and it really works. Highly appreciated!

Why the hell Microsoft can't make the functionality of httpcfg in the IIS management interface is really beyond me.

Thanks again! :thumbsup:

 

Jamsan

Senior member
Sep 21, 2003
795
0
71
Originally posted by: mxnerd
Hi Jamsan:

Thanks for your great instruction! I followed your instruction step by step and it really works. Highly appreciated!

Why the hell Microsoft can't make the functionality of httpcfg in the IIS management interface is really beyond me.

Thanks again! :thumbsup:

Sounds like you expected somethin different from Microsoft! :p

Glad it works :)
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,103
126
Hi Jamsan:

Today I rebooted the server and the IIS default website won't start anymore, any idea? I checked everything and IIS is the only process listen on port 80 and on 192.168.1.8

The error message is "The Network Location cannot be reached".
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,103
126
I know why now right after I posted the question.

I have to remove 127.0.0.1 from multiple identities from IP address Advanced option.

However, after doing this, I was unable to access several Server Management pages (like Backup or Update Services home pages)

Oh, well, maybe another machine or VM will be better option.