Navigate
Home
ArticleWiki
Forum
Journal
Search
Newsletter
Links
Tech News
expertsrt.com
Welcome Guest.
Username:

Password:

Remember me

Apache and IIS in a same computer to host PHP and ASP.Net Sites
Welcome, Guest. Please login or register.
November 23, 2008, 06:27:55 AM
11307 Posts in 1250 Topics by 501 Members
Latest Member: rosaline
Experts Round Table Network  |  Webservers  |  Apache  |  Apache and IIS in a same computer to host PHP and ASP.Net Sites « previous next »
Pages: [1]
Author Topic: Apache and IIS in a same computer to host PHP and ASP.Net Sites  (Read 2045 times)
dinesh

Offline Offline

Posts: 2


« on: February 15, 2008, 01:42:06 AM »

Hello,

Is it possible to use a computer to host the sites developed in PHP and ASP.Net by installing Apache and IIS respectively?

Dinesh
Logged
VGR
Mentor

Offline Offline

Posts: 682



WWW
« Reply #1 on: February 15, 2008, 04:32:46 PM »

well, first if ever it would work, both servers would have to serve different "ports" of the TCP protocol, like 80 and 8080.

Then, theoretically, both Apache and IIS can do the job. Apache is best at servign normal standard stuff like *AMP, but it can also serve ASP.Net (despite my hatred of it) see http://ubuntuforums.org/archive/index.php/t-50369.html
IIS, on the reverse, albeit the unefficiency caused both by itself (security holes, lack of administrative power, opacity of the configuration etc) and the flaws of the platform (Windaube, for memory management, threading model, resource starvation and security holes again etc) is best at serving ASP.Net, SQL-Server (or Access :D :D :D) data, biut can also serve PHP pages ; and MySqld runs quite well on windoze.

so in fact you can handle both "worlds" with a single web server.

have fun ;)
Logged

techie overlord, answers all kind of questions on http://www.europeanexperts.org
GrandSchtroumpf
Mentor

Offline Offline

Posts: 409



« Reply #2 on: February 16, 2008, 03:04:29 AM »

VGR is correct, both servers cannot use the same IP/Port combination... But...

You can use 2 different IP addresses.
http://www.prismix.com/blog/2006/06/running_apache_and_iis_6_toget.cfm
In this case, both Apache and IIS listen to the default port (80), but on different IP addresses.

Or use Apache as proxy for your IIS websites.
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
In this case, Apache listens to the default port (80) and IIS listens to another port (e.g. 8080).
All http requests pass through Apache.
Logged
VGR
Mentor

Offline Offline

Posts: 682



WWW
« Reply #3 on: February 17, 2008, 01:35:49 PM »

I think you'll agree that installing only ONE web server able to handle both kind of sites is the best solution to our friend's problem, compared to using mod_proxy and/or different adresses or ports.

dinesh, in fact, the most honest answer is : if you want to handle ASP.Net "web" sites, then install IIS. Install PHP for IIS (see online www.php.net install section) and off you go.

My personal solution was : NEVER use ASP.Net nor ActiveX nor IIS, but it's a personally-biased choice ;-)
Logged

techie overlord, answers all kind of questions on http://www.europeanexperts.org
rdivilbiss
Governing Council Member
*
Offline Offline

Posts: 414



WWW
« Reply #4 on: February 17, 2008, 07:02:54 PM »

I agree with VGR. Use IIS rather than two web servers.  It is easy to install PHP on IIS, and while I do not like ASP.NET, I still write some legacy classic ASP both for examples for others and for one of my pre existing sites that I do not wish to rewrite in PHP.
Logged

Rod
GrandSchtroumpf
Mentor

Offline Offline

Posts: 409



« Reply #5 on: February 18, 2008, 10:49:15 AM »

I'm not saying one solution is better than the others...  I just added some alternate solutions to the list.

I know that Apache is often used as proxy for other web servers, like Tomcat.
It can also be used for load balancing, but that's a different story.
I found some info about people who use Apache proxy for IIS for security reasons.

The more options you have, the better it is.
Since I don't know much about Windoze and IIS, I don't have any personal preference for one particular solution.
I would go for Apache and PHP on Linux on a separate machine, that's a lot easier to maintain.
Logged
rdivilbiss
Governing Council Member
*
Offline Offline

Posts: 414



WWW
« Reply #6 on: February 19, 2008, 07:01:56 PM »

I wasn't knocking your suggestions.
Logged

Rod
GrandSchtroumpf
Mentor

Offline Offline

Posts: 409



« Reply #7 on: February 20, 2008, 03:08:38 AM »

> I wasn't knocking your suggestions.

I'm sure you weren't.  We are way too civilized for that.  ;)

My last post might sound defensive, but it was only meant to express doubt...
My knowledge is only theoretical.  I never used mod_proxy, never used IIS, and never configured two web servers on the same machine.

I just meant to say that, from what i heard, mod_proxy is widely used for lots of different reasons, but i don't know the details.

There are some valid reasons why one would want to use Apache instead of IIS.
Apache has some features that IIS does not have (like mod_rewrite).

As we have seen before, some PHP functions even behave differently on Apache+Windoze and on Apache+Linux... like the "usleep" function (which has been fixed in PHP5/Win by the way).  Those differences are rare, but they exist.
Logged
GrandSchtroumpf
Mentor

Offline Offline

Posts: 409



« Reply #8 on: February 21, 2008, 02:24:50 PM »

linux.com has just release an article on Abyss web server which supports both PHP and ASP.net on Windoze and supports url rewriting.
http://www.linux.com/feature/126852
Logged
CrYpTiC_MauleR
Site Builder

Offline Offline

Posts: 489



WWW
« Reply #9 on: February 21, 2008, 08:33:35 PM »

Just my two cents, I have tried Abyss before and it found it a great easy to understand and setup server from beginners to experts. Adding PHP, Perl and ASP support was a snap. I am not sure if they have added ASP.NET support since I last tried it out years ago though.
Logged

[x] Fight | www.crypticmauler.com
"You must be
Pages: [1]
« previous next »
    Jump to: