apache - windows下运行php的web server,怎么搭配性能比较优
受限只能在windows用php,nginx就不考虑了,太弱;swoole也没win版本
我的设想是iis7.5,op缓存有wincache,好在redis/memcache都有win版可用
另外一个是apache+mod_fpm/mod_fastcgi,win下按理应该是fcgi方式快一些吧
顺便问一下,如果是纯html,用哪个web server最佳?如果以上性能不够,可能会生成纯html的方式
回复内容:
受限只能在windows用php,nginx就不考虑了,太弱;swoole也没win版本
我的设想是iis7.5,op缓存有wincache,好在redis/memcache都有win版可用
另外一个是apache+mod_fpm/mod_fastcgi,win下按理应该是fcgi方式快一些吧
顺便问一下,如果是纯html,用哪个web server最佳?如果以上性能不够,可能会生成纯html的方式
kangle也不错哦。
PHP官方的ZendOpcache同样支持Windows,不需要使用wincache这个东西.
Redis和Memcached的Windows版本是第三方提供的,不是Redis/Memcached官方支持的.
Swoole在Cygwin环境下也可以运行于Windows.
Windows 7 上 IIS 和 Apache 性能测试对比
环境(64位Win7): IIS7+PHP5.4(NTS非线程安全版本) vs Apache2.4(32位)+PHP5.4
静态文件处理:
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
结论:基于APR运行时和WinNT多线程的Apache在静态资源处理方面并不比IIS差.
PHP文件处理:
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
结论:Apache使用了线程化的MPM,所以需要使用线程安全版本的PHP,而线程安全检查有一定开销,所以性能要比IIS+PHP-CGI低一些.
在一次IIS7+PHP的phpinfo()测试中,100并发,10000个请求,居然有8978个请求失败了!
然而,访问量多大呢?什么类型的网站呢?
我想知道 nginx 怎么就太弱了。。。
坑太多。我们公司用了几年的win。IIS. php.
这个月决定转移到liunx了。主要是一个网站在IIS上不停报错。客户已经吧电话打爆了。最后迁移到Liunx。问题解决。老板决定以后再也不用win服务器了。早点出坑吧。到时候出l了问题。哭都来不及。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP remains important in modern web development, especially in content management and e-commerce platforms. 1) PHP has a rich ecosystem and strong framework support, such as Laravel and Symfony. 2) Performance optimization can be achieved through OPcache and Nginx. 3) PHP8.0 introduces JIT compiler to improve performance. 4) Cloud-native applications are deployed through Docker and Kubernetes to improve flexibility and scalability.

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

To set up a CGI directory in Apache, you need to perform the following steps: Create a CGI directory such as "cgi-bin", and grant Apache write permissions. Add the "ScriptAlias" directive block in the Apache configuration file to map the CGI directory to the "/cgi-bin" URL. Restart Apache.

PHP and Python each have their own advantages and are suitable for different scenarios. 1.PHP is suitable for web development and provides built-in web servers and rich function libraries. 2. Python is suitable for data science and machine learning, with concise syntax and a powerful standard library. When choosing, it should be decided based on project requirements.

The steps to start Apache are as follows: Install Apache (command: sudo apt-get install apache2 or download it from the official website) Start Apache (Linux: sudo systemctl start apache2; Windows: Right-click the "Apache2.4" service and select "Start") Check whether it has been started (Linux: sudo systemctl status apache2; Windows: Check the status of the "Apache2.4" service in the service manager) Enable boot automatically (optional, Linux: sudo systemctl

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.
