简体   繁体   中英

What are the differences between IIS and Apache for PHP hosting?

I have spent a fair amount of time working with PHP in both IIS and Apache server (Windows) configurations. I have seen suggested a couple of times that Apache is preferred over IIS.

I had been under the impression that one of the primary reasons for Apache over IIS was that performance under CGI through IIS was significantly slower. However, the support through Fast CGI seems to have fixed much of that issue.

Another issue is certainly licensing costs, but assuming that isn't an issue, what are the other differences, assuming a Windows-based platform?

You're right, IIS FastCGI nullifies any arguments about PHP on IIS being slower than Apache. Assuming a Windows Platform, leveraging IIS gives you all of the benefits that come with using IIS like: a brain-dead simple path to clustering; leveraging the Web Platform Installer to get a jumpstart on running common PHP apps like Drupal; and the ability to combine technologies like PHP and ASP.NET in the same website.

The most obvious answer is that if you work with other people, administrators who work with PHP are much more likely to have Apache experience rather than IIS experience. So in larger companies in particular we tend to support these trends because it reduces real and perceived knowledge burden and training cost. That is, we always use Apache for PHP, and we always run it on Linux because it is really easier to hire web admins who have supported PHP with Apache on Linux.

If its just you then obviously this doesn't apply. You're going to hear Apache suggested more because its what more people have used, but that doesn't necessarily mean anything to you. If you've got a lot of experience with both then you are in a better position to answer this yourself than the majority of people who you'll see opinions from.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM