In windows-server, we recommend that you select php + apache or php + iis to configure the php environment of the server.

Source: Internet
Author: User
Recently, I have prepared to configure the php5.6 environment on the server. Therefore, I would like to ask if it is better to match the web server and compare the performance and security. Thank you! Recently, I have prepared to configure the php5.6 environment on the server. Therefore, I would like to ask if it is better to match the web server and compare the performance and security. Thank you!

Reply content:

Recently, I have prepared to configure the php5.6 environment on the server. Therefore, I would like to ask if it is better to match the web server and compare the performance and security. Thank you!

High Concurrency and high performance is suitable for nginx + php;
For stability, module, and rewrite, apache + php is more suitable;

Security is safe;
Nginx is a trend;

What do you say about iis? Well, you just need to look at this stuff with an interest in history. don't use it for production;

Finally, it is not recommended to run php in a windows environment; network services; linux is the first choice;

We recommend IIS + PHP

  1. Apache is not recommended for Windows. There are a few pitfalls, some machines may need to modify the configuration file to improve concurrency (if not modified, the user will open two pages at the same time and then the third page will not be accessible)

  2. If you are using a newer Windows Server, consider IIS. I don't remember which version of IIS is later than, and the performance of IIS + PHP can catch up with or even surpass nginx.

P.S. if it is not mandatory, we suggest you use Linux. it is estimated that most PHP programmers are tested in Linux, and the environment is easy to use and the O & M is simple.

(The Learning Cost of Windows Sever is slightly higher. if you just use the remote Desktop connection as the Desktop version, ignore this sentence)

We recommend that you use IIS for windows and win your own products.

I understand what you mean. to build a server, we need to add resources such as linux and php to nginx, and the high performance and high concurrency.

Performance Test comparison between IIS and Apache on Windows 7
Environment (64-bit Win7): IIS7 + PHP5.4 (default security 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 multithreading is not inferior to IIS in terms of 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 the thread-based MPM, so it needs to use the thread-safe version of PHP, and the thread security check has a certain overhead, so the performance is lower than that of IIS + PHP-CGI.

We recommend that you use the solution you are familiar with. Personally, I should be familiar with Apache, and the configuration is not much different from that on Linux. it is also easier to find rewrite materials. of course, if you are on Linux, you can consider using the Nginx/PHP-FPM combination.

We recommend that you discard Windows Server, which is too resource-consuming and insecure. Linux with high security is the correct 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.