互联网公司用的服务器是 apache 还是 nginx?

2016-07-27 10:25:50 +08:00
 nightspirit

现在多少公司用 apache 多少公司用 nginx ?还有就是为啥用你现在的服务器额?

12306 次点击
所在节点    服务器
52 条回复
ivmm
2016-07-27 10:28:44 +08:00
Nginx 主要用作前端

后面可能是 tomcat 也可能是 apache 也可能直接就是 php-FPM
mrytsr
2016-07-27 10:30:11 +08:00
n
nightspirit
2016-07-27 10:31:12 +08:00
@ivmm 我看着好多小公司 用的 nginx ,说 nginx 能处理高并发
9hills
2016-07-27 10:31:47 +08:00
Nginx 居多, apache 逐渐不行了,因为包括 php python java 等都不需要 apache 了,有 php-fpm ggunicorn etc

原来是 mod_php mod_wsgi 之类
loading
2016-07-27 10:32:36 +08:00
apache 和 nginx 对比文章,一大堆~
nightspirit
2016-07-27 10:32:48 +08:00
@9hills 那为何 apache 不行了,有没有相关方面的介绍或者资料呢?
ivmm
2016-07-27 10:33:51 +08:00
@nightspirit
Apache 确实属于比较厚重的了。

Nginx 社区版是免费的,而且又有 Openresty 和 Tengine 这样的衍生,

而 Litespeed 这种兼容 Apache 的又太贵
nightspirit
2016-07-27 10:34:16 +08:00
@loading 网上文章确实挺多,可是都不够完全介绍的
nightspirit
2016-07-27 10:36:37 +08:00
@ivmm 恩,那 apache 比起 nginx 的优势有么?
tvallday
2016-07-27 10:38:42 +08:00
@nightspirit LetMeGoogleForYou
nightspirit
2016-07-27 10:58:21 +08:00
@tvallday 更希望能推荐我本书,对于一些技术,搜索引擎有些时候不会很准确,而且技术版本更迭,单纯的应用,对于提高也没什么好处
ivmm
2016-07-27 11:03:18 +08:00
@nightspirit 善用搜索引擎
ovear
2016-07-27 11:07:03 +08:00
然热 Nginx 一般情况都充当的是代理服务器,不直接处理业务。。而且还可以用 lua 编写点小脚本。。
Apache 一般是拿来处理业务的。。
pubby
2016-07-27 11:07:13 +08:00
都用, nginx 前端接入

其他主要用 apache mod_php 跑 php ,以前 cgi fpm 都不如 mod_php 稳定,一致沿用下来。
smileawei
2016-07-27 11:12:10 +08:00
Nginx 用久了。回过头来配 httpd 总感觉很不爽。
nightspirit
2016-07-27 11:16:15 +08:00
@ivmm 哦,好吧
nightspirit
2016-07-27 11:17:00 +08:00
@ovear 也就是说 apache 做主要业务吧?
nightspirit
2016-07-27 11:18:46 +08:00
@pubby
@smileawei
我们公司之前也都是 nginx ,不过之前看一个腾讯的案例,说是用 apache ,成功升级到了 php7,处理的高并发也还 ok
ovear
2016-07-27 11:19:51 +08:00
@nightspirit 对, Apache 之类的能直接跑业务逻辑。简单来说就是, Apache 可以直接跑你写的 php 。
Nginx 是把请求全部转发到 php-fpm 上面,让 php 自己处理
9hills
2016-07-27 11:20:02 +08:00
@nightspirit 因为 mod_php mod_wsgi 是 apache 的 Module 啊,现在不用了,就没必要再带一个重重的 Apache

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/295197

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX