当前位置:首页 > 黑客技术 > 正文内容

Web 服务器基准测验,nginx+php vs Apache+php

访客4年前 (2021-04-15)黑客技术788

本次测验nginx+php与apache+php哪种组合的核算性能及稳定性更佳
操作系统:Centos6.4 x64
硬件环境:
 
服务器IP
硬件装备
人物
192.168.1.2
4中心 8GB
基准测验服务器
192.168.1.3

基准测验客户端
试验思路:在本次测验中计划选用,同版别组合测验,如(nginx1.4.4+php5.5.7)vs (httpd2.4.2+php5.5.7) 和 (nginx+php7) vs(apache+php7),测验程序有两种,分别为算法程序和衔接数据库的读写程序。
首要装置环境
这儿只讲Apache的装置装备nginx装备简略(略)
一、编译Apache
Apache官网:http://httpd.apache.org/
这儿运用httpd2.4.2 其他httpd2.4.x系列装置装备都是差不多的。
1、装置依靠包
tar -zxvf apr-1.5.0.tar.gz
cp -rf apr-1.5.0 httpd-2.4.2/srclib/apr
 
tar -zxvf apr-util-1.5.3.tar.gz
cp -rf apr-util-1.5.3 httpd-2.4.2/srclib/apr-util
2、装备编译选项及装置
./configure --prefix=/alidata/server/httpd
--with-mpm=prefork
--enable-so
--enable-rewrite
--enable-mods-shared=all
--enable-nonportable-atomics=yes
--disable-dav
--enable-deflate
--enable-cache
--enable-disk-cache
--enable-mem-cache
--enable-file-cache
--enable-ssl
--with-included-apr
--enable-modules=all 
--enable-mpm-shared=all
 
make -j 4
make install
# 供给发动脚本
cp support/apachectl /etc/init.d/httpd
chmod u+x /etc/init.d/httpd
部分编译参数详解:
界说默许运用的mpm形式
--with-mpm=prefork
装置一切的mpm模块
--enable-mpm-shared=all
3、修正主装备文件:httpd.conf
ServerRoot "/alidata/server/httpd"
Listen 80
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule filter_module modules/mod_filter.so
LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
User daemon
Group daemon
/IfModule>
ServerAdmin you@example.com
    AllowOverride none
    Require all denied
/Directory>
DocumentRoot "/alidata/server/httpd/htdocs"
"/alidata/server/httpd/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
/Directory>
    DirectoryIndex index.html
/IfModule>
".ht*">
    Require all denied
/Files>
ErrorLog "logs/error_log"
LogLevel warn
    LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
    LogFormat "%h %l %u %t "%r" %>s %b" common
   
      LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
    /IfModule>
    CustomLog "logs/access_log" common
/IfModule>
    ScriptAlias /cgi-bin/ "/alidata/server/httpd/cgi-bin/"
/IfModule>
/IfModule>
"/alidata/server/httpd/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
/Directory>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
/IfModule>
Include conf/extra/proxy-html.conf
/IfModule>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
/IfModule>
4、装备虚拟主机
Include /alidata/server/httpd/conf/vhosts/*.conf
".php">
Order allow,deny
Deny from all
/Files>
/DirectoryMatch>
 
        DocumentRoot /alidata/www/phpwind

[1] [2] [3] [4]  黑客接单网

扫描二维码推送至手机访问。

版权声明:本文由黑客接单发布,如需转载请注明出处。

本文链接:http://therlest.com/106613.html

分享给朋友:

“Web 服务器基准测验,nginx+php vs Apache+php” 的相关文章

华流年京东618怎么买便宜

京东618活动已经在火热进行中的哦,各位有买什么东西了吗?很多小伙伴在活动一开始的时候就迫不及待的买了很多东西了,还有些小伙伴还很犹豫不知道买啥,接下来百思特小编就来教教大家2020年京东618怎么便宜吧~ 京东618怎么买便宜 活动时...

美团暗语「美团暗语2021」

 昨天,很多网友问小编美团暗语最好的方法是什么?有关美团暗语2021最好的方法是哪种?最新美团暗语2020?根据网民透露的审判细节这篇文章主要介绍了美团暗语,包括美团暗语 据大江网2021年10月20日17:01:48的最新消息,微博网友@ 爆料。 平安夜来临之际,事件,在网上炒得沸沸扬扬,引发全...

接单的黑客_可以找黑客黑美团吗

有在网络安全范畴中,猜测网络违法和歹意软件发展趋势好像现已成为了各大网络安全公司的传统了。 为了防止让咱们去阅览上百页的安全陈述,咱们专门整兼并总结了McAfee、Forrester、FiskIQ、卡巴斯基实验室【1、2、3】、WatchGuard、Nuvias、FireEye、CyberArk、F...

黑客了解,中国黑客越南网络apt,黑客网站密码破解工具

6.42 · hxxp[://]offlineearthquake[.]com/file//?id=&n=000 进程三:使命履行及实时数据剖析10.61 2019年6月19日,FireEye Endpoint Security设备上收到了缝隙检测警报。 违规应用程序被辨认为Microso...

宏观经济学价格效应 「经济学传递效应」

饮水机效应,价格效应可分解为替代效应和收入效应。通货膨胀的经济效应主要有两个方面,中提出了著名的“节约悖论,比如买切糕,1元钱买了一块切糕,2,利息和货币通论,微观经济学中的价格效应中的一个问题。 “挤出”效应,政府购买和转移支付对我们经济的影响,加剧了收入分配的不均等化进一步加剧。微观经济学,即不...

二手退役62军用望远镜(二手60倍望远镜转让)

并不是真正的军用级别产品,现在绝大部分,北京星河望远镜为您解答:我们,俺以前买过退役俄罗斯的,为满足全天侯使用要求开发成功的高密封。 需要望远镜。早期的军用望远镜,长时间看不头晕.平常旅游观景、如今已经推出军队服役,不会存在,尽管现在的光学技术水平有了很大提高。 宽带增透绿膜镜头,62式8X30望远...

评论列表

莣萳鸠魁
3年前 (2022-07-04)

准测验客户端试验思路:在本次测验中计划选用,同版别组合测验,如(nginx1.4.4+php5.5.7)vs (httpd2.4.2+php5.5.7) 和 (nginx+php7) vs(apache+php7),测验程序有

泪灼挽鹿
3年前 (2022-07-04)

e.com    AllowOverride none    Require all denied/Directory>DocumentRoot "/alidata/server/httpd/htdocs

俗野闹旅
3年前 (2022-07-04)

etc/init.d/httpd chmod u+x /etc/init.d/httpd部分编译参数详解:界说默许运用的mpm形式--with-mpm=prefork装置一切的mpm模块--enable-mpm-shared=a

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。