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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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 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.

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 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.

PHP is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

When the Apache 80 port is occupied, the solution is as follows: find out the process that occupies the port and close it. Check the firewall settings to make sure Apache is not blocked. If the above method does not work, please reconfigure Apache to use a different port. Restart the Apache service.

Apache connects to a database requires the following steps: Install the database driver. Configure the web.xml file to create a connection pool. Create a JDBC data source and specify the connection settings. Use the JDBC API to access the database from Java code, including getting connections, creating statements, binding parameters, executing queries or updates, and processing results.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

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
