Windows-server Configure the server's PHP environment, it is recommended to choose Php+apache or Php+iis

Source: Internet
Author: User
Recently prepared to configure the php5.6 environment on the server, so I would like to ask the suggestion is that the Web server collocation is better, from the performance, security to compare. Thank you!

Reply content:

Recently prepared to configure the php5.6 environment on the server, so I would like to ask the suggestion is that the Web server collocation is better, from the performance, security to compare. Thank you!

High concurrent high performance suitable for use with nginx+php;
To seek stability, to find modules, to seek rewrite words; apache+php more appropriate;

Safe words are no problem;
Nginx is a trend tide;

You said IIS? Well, it's a thing to look at in the interest of history;

Finally, it is not recommended to run PHP in the Windows environment, network services, Linux is the first choice;

Recommended IIS + PHP

    1. Windows is not recommended to use Apache, pit slightly more, some machines may also have to change the configuration file to improve concurrency (without changing the user at the same time open two pages after the third page will not be able to access)

    2. If you are a newer Windows Server, you can consider IIS. I do not remember which version of IIS since, the performance of IIS + PHP can be in time or even beyond Nginx

P.S. If not forced, it is recommended that you use Linux, most of the PHP programmers are tested under Linux, and the environment is easier to get started, operation is simple

(The learning cost of Windows Sever is really slightly higher, if you are just a remote Desktop connection to use as a desktop version, then please ignore my words)

Windows recommends using Iis,win's own home product

Understand what you mean, build the server to use Linux plus PHP plus nginx such resources, and high-performance concurrency

Comparison of IIS and Apache performance tests on Windows 7
Environment (64-bit Win7): iis7+php5.4 (NTS non-thread-safe version) vs Apache2.4 (32-bit) +php5.4

Static file Processing:
Ab-k-c100-n10000 http://127.0.0.1/info.htm # IIS RPS 1709
Ab-k-c100-n10000 http://127.0.0.1:8080/info.htm # Apache RPS 1847
Conclusion: Apache based on Apr runtime and Winnt Multi-threading is no worse than IIS in static resource processing.

PHP file Processing:
Ab-k-c100-n10000 http://127.0.0.1/bs.php # IIS RPS 1180
Ab-k-c100-n10000 http://127.0.0.1:8080/bs.php # Apache RPS 1071
Conclusion: Apache uses threaded MPM, so a thread-safe version of PHP is required, and thread safety checks have some overhead, so performance is lower than iis+php-cgi.

Suggest with you familiar with the scheme, personally, I am familiar with Apache, configuration and Linux is not very different, rewrite rewrite data is also relatively easy to find. Of course, if you're on Linux, consider using NGINX/PHP-FPM's combination.

It is recommended that you throw away Windows Server, which is too resource-intensive and insecure, with high-security Linux being the positive solution!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.