IIS and Apache on same PC, both on port 80?

IIS and Apache on same PC, both on port 80?

am 04.09.2006 16:39:30 von Noozer

My requirements:

- Two domain names. A number of subdomains.
- Some sites utilize ASP
- I'd like to install some PHP sites

Can IIS and Apache be installed on the same PC, and both service port 80,
depending on the domain requested? Are mulitple IP addresses required for
this, or can this be done on a single IP?

Can IIS run PHP code? Does code have to be modified to do so?

Can Apache run ASP code? Again, does the code have to be altered to do so?

OS is Windows XP Pro SP2, so IIS has a limited number of connections and
only hosts a single domain.

Re: IIS and Apache on same PC, both on port 80?

am 04.09.2006 17:21:19 von Kristofer Gafvert

Hello,

You can never have more than one application listening on the same port
and IP address (this is not a limitation in IIS nor Apache, it is how
things work).

So you will need multiple IP addresses if you want to use port 80. There
are however other solutions. You can have Apache listen on port 80, and
based on certain rules, forward the request to IIS (this can be done by
the mod_proxy module) and have IIS listen on another port. The same thing
can be done in IIS by using an ISAPI filter (for example ISAPI_Rewrite).
You can also use a third-party application that can do this.

So to answer your first question: You can install IIS and Apache on the
same machine, but you cannot have them both run on the same port and
listen on the same IP address. That is impossible.

IIS can run PHP code. IIS does not read the code, it just handles it over
to the PHP intepreter (ISAPI application or CGI, i would recommend ISAPI),
so you should not need to change any code. If so, that is because the PHP
developers have choosen to do it that way. IIS just does not care about
the code, hence IIS does not require anything to be changed.


--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info


Noozer wrote:

>My requirements:
>
>- Two domain names. A number of subdomains.
>- Some sites utilize ASP
>- I'd like to install some PHP sites
>
>Can IIS and Apache be installed on the same PC, and both service port 80,
>depending on the domain requested? Are mulitple IP addresses required for
>this, or can this be done on a single IP?
>
>Can IIS run PHP code? Does code have to be modified to do so?
>
>Can Apache run ASP code? Again, does the code have to be altered to do so?
>
>OS is Windows XP Pro SP2, so IIS has a limited number of connections and
>only hosts a single domain.

Re: IIS and Apache on same PC, both on port 80?

am 04.09.2006 17:21:19 von Kristofer Gafvert

Hello,

You can never have more than one application listening on the same port
and IP address (this is not a limitation in IIS nor Apache, it is how
things work).

So you will need multiple IP addresses if you want to use port 80. There
are however other solutions. You can have Apache listen on port 80, and
based on certain rules, forward the request to IIS (this can be done by
the mod_proxy module) and have IIS listen on another port. The same thing
can be done in IIS by using an ISAPI filter (for example ISAPI_Rewrite).
You can also use a third-party application that can do this.

So to answer your first question: You can install IIS and Apache on the
same machine, but you cannot have them both run on the same port and
listen on the same IP address. That is impossible.

IIS can run PHP code. IIS does not read the code, it just handles it over
to the PHP intepreter (ISAPI application or CGI, i would recommend ISAPI),
so you should not need to change any code. If so, that is because the PHP
developers have choosen to do it that way. IIS just does not care about
the code, hence IIS does not require anything to be changed.


--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info


Noozer wrote:

>My requirements:
>
>- Two domain names. A number of subdomains.
>- Some sites utilize ASP
>- I'd like to install some PHP sites
>
>Can IIS and Apache be installed on the same PC, and both service port 80,
>depending on the domain requested? Are mulitple IP addresses required for
>this, or can this be done on a single IP?
>
>Can IIS run PHP code? Does code have to be modified to do so?
>
>Can Apache run ASP code? Again, does the code have to be altered to do so?
>
>OS is Windows XP Pro SP2, so IIS has a limited number of connections and
>only hosts a single domain.

Re: IIS and Apache on same PC, both on port 80?

am 04.09.2006 17:43:17 von Daniel Crichton

Noozer wrote on Mon, 04 Sep 2006 14:39:30 GMT:

> My requirements:
>
> - Two domain names. A number of subdomains.
> - Some sites utilize ASP
> - I'd like to install some PHP sites
>
> Can IIS and Apache be installed on the same PC, and both service port 80,
> depending on the domain requested? Are mulitple IP addresses required for
> this, or can this be done on a single IP?

Would require multiple IPs.

> Can IIS run PHP code? Does code have to be modified to do so?

Yes it can, and, other than the modifications which would be required when
running under Apache on Win XP, there should be no need to change anything.

> Can Apache run ASP code? Again, does the code have to be altered to do so?

Yes, but it would require an ASP add-on to do so, the only one I know of
that's reliable is from Sun and is not free. The code may need alteration to
work properly too, depending on how complex it is.

> OS is Windows XP Pro SP2, so IIS has a limited number of connections and
> only hosts a single domain.

If you don't need many connections and only one domain, IIS with PHP
installed will work for you.

Dan

Re: IIS and Apache on same PC, both on port 80?

am 04.09.2006 17:43:17 von Daniel Crichton

Noozer wrote on Mon, 04 Sep 2006 14:39:30 GMT:

> My requirements:
>
> - Two domain names. A number of subdomains.
> - Some sites utilize ASP
> - I'd like to install some PHP sites
>
> Can IIS and Apache be installed on the same PC, and both service port 80,
> depending on the domain requested? Are mulitple IP addresses required for
> this, or can this be done on a single IP?

Would require multiple IPs.

> Can IIS run PHP code? Does code have to be modified to do so?

Yes it can, and, other than the modifications which would be required when
running under Apache on Win XP, there should be no need to change anything.

> Can Apache run ASP code? Again, does the code have to be altered to do so?

Yes, but it would require an ASP add-on to do so, the only one I know of
that's reliable is from Sun and is not free. The code may need alteration to
work properly too, depending on how complex it is.

> OS is Windows XP Pro SP2, so IIS has a limited number of connections and
> only hosts a single domain.

If you don't need many connections and only one domain, IIS with PHP
installed will work for you.

Dan