nginx启用spdy支持
nginx限制访问速度

如何给在用的nginx添加新模块?

妙音 posted @ 2014年11月13日 11:29 in nginx , 5174 阅读
有一个在用的nginx,以yum方法安装的,怎样在不改动配置的情况下,为它添加模块.
以添加spdy模块为例.

编译新模块

预编译
./configure  --prefix=/etc/nginx \
   --sbin-path=/usr/sbin \
   --conf-path=/etc/nginx/nginx.conf \
   --pid-path=/run/nginx.pid  \
   --error-log-path=/var/log/nginx/error.log \
   --with-http_spdy_module \
   --with-http_ssl_module \
   --with-ipv6 
--sbin-path, --pid—path, --conf—path,--erro—path三个参数是设定默认配置路径.
如果旧的nginx不是以/usr/local/nginx为安装路径,则需要指定上面参数,可以在旧nginx的nginx.conf文件中取到.
 
编译
make之后复制

验证新nginx是否可用

验证编译后的nginx是否可以使用已有的配置
./obj/nginx -t

使用新nginx

备份 cp /usr/sbin/nginx /usr/sbin/nginx-bak
替换 cp ./obj/nginx /usr/sbin/nginx
ok了
 
Avatar_small
依云 说:
2014年11月15日 00:11

不 OK。完全错了。

cp ./obj/nginx /usr/sbin/nginx 这句很可能会导致运行中的旧 nginx 崩溃。参见 http://en.chys.info/2009/05/install-vs-cp-and-mmap/ 安装二进制文件应该使用 install 命令。

Avatar_small
妙音 说:
2014年11月17日 08:48

@依云: nginx的Makefile也是用cp

Avatar_small
依云 说:
2014年11月17日 12:13

@妙音: 不是吧……

Avatar_small
依云 说:
2014年11月17日 12:35

@妙音: 好吧,nginx 连在别的目录 build 都不支持,默认的安装路径也和 Apache httpd 之类的一样怪异无比…………

Avatar_small
依云 说:
2014年11月17日 12:36

@妙音: 不过它在 cp nginx 前会把旧的 nginx 给移走,所以大部分时候不会覆盖旧的 nginx 文件。

Avatar_small
ibmseo 说:
2020年10月08日 20:41

I’m excited to uncover this page. I need to to thank you for ones time for this particularly fantastic read !! I definitely really liked every part of it and i also have you saved to fav to look at new information in your site. 먹튀검증

Avatar_small
farhan 说:
2020年10月11日 19:35 They're produced by the very best degree developers who will be distinguished for your polo dress creating. You'll find polo Ron Lauren inside exclusive array which include particular classes for men, women. Capital Gains Tax Advice
Avatar_small
farhan 说:
2020年10月12日 16:23

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Tax Advisors Tax Accountants

Avatar_small
안전놀이터 说:
2020年10月13日 18:29

I did so appreciate reading through content articles submitted on this website. They're amazing and it has lots of helpful info.

Avatar_small
farhan 说:
2020年10月13日 19:56

Took me time to understand all of the comments, but I seriously enjoyed the write-up. It proved being really helpful to me and Im positive to all of the commenters right here! Its constantly nice when you can not only be informed, but also entertained! I am certain you had enjoyable writing this write-up. top sites de rencontre

Avatar_small
먹튀 说:
2020年10月21日 04:02

I've got not long ago started off some sort of blog site, the internet people produce here possesses served everyone enormously. Appreciate it intended for all of your current time period & do the job.

Avatar_small
먹튀검증커뮤니티 说:
2020年10月25日 14:40

That is a good write-up When i viewed on account of write about the item. Really it is what exactly I need to to discover trust with foreseeable future you might go on intended for giving a really fantastic write-up.

Avatar_small
farhan 说:
2020年10月27日 20:00

Great Article it its really informative and innovative keep us posted with new updates. its was really valuable. thanks a lot. 먹튀폴리스

Avatar_small
farhan 说:
2020年10月29日 18:39

Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. 토토사이트

Avatar_small
farhan 说:
2020年10月31日 20:03

It should be noted that whilst ordering papers for sale at paper writing service, you can get unkind attitude. In case you feel that the bureau is trying to cheat you, don't buy term paper from it. buy instagram story views and impressions

Avatar_small
Digital ALi 说:
2020年11月03日 19:37

What is an outstanding post! “I’ll be back” (to read more of your content). Thanks for the nudge! shaw internet plans

Avatar_small
먹튀폴리스 说:
2020年11月07日 19:16

Make the most of mainly premium substances - you will find him or her for:

Avatar_small
farhan 说:
2020年11月12日 13:31 You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. 먹튀검증
Avatar_small
farhan 说:
2020年11月16日 14:30

Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up. 먹튀검증

Avatar_small
Top SEO 说:
2020年11月19日 13:54

This blog is so nice to me. I will keep on coming here again and again. Visit my link as well.. 먹튀폴리스

Avatar_small
Top SEO 说:
2020年11月24日 08:01 The website is looking bit flashy and it catches the visitors eyes. Design is pretty simple and a good user friendly interface. CBD Bud
Avatar_small
안전놀이터 说:
2020年11月24日 20:03

As i purchased with your blog site while positioning fascination purely a little bit little submits. Fulfilling technique for extended, We will be book-marking during a period attain forms finish happens further up.

Avatar_small
jacksonseo 说:
2020年12月20日 19:02

This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. poetry sad love

Avatar_small
jacksonseo 说:
2020年12月23日 23:20

This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work mollie abrechnung

Avatar_small
jacksonseo 说:
2020年12月29日 19:50

Your site is truly cool and this is an extraordinary moving article. Holzpool 

Avatar_small
seo 说:
2020年12月31日 17:51

this is a very beautiful gig

Avatar_small
jacksonseo 说:
2021年1月07日 17:21

I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. Ovalpools

Avatar_small
1Z0-083 PDF Dumps 说:
2024年2月03日 23:04

Empower your certification journey with Certs4Exam's PDF Dumps 2k24. Quality resources, real success. Your path to excellence starts here.

Avatar_small
PDF Dumps 说:
2024年2月04日 00:08

Seeking PDF Dumps 2k24? Look no further. Certs4Exam offers reliable study materials to propel you towards certification success.

Avatar_small
200-301 Exam Dumps 说:
2024年2月04日 00:16

Embark on a journey of excellence with Certs4Exam 200-301 PDF Dumps 2k24. Unleash the power of authentic study resources for guaranteed success in your certifications.

Avatar_small
1D0-1080-24-D PDF Du 说:
2024年5月16日 19:19

Navigating the 1D0-1080-24-D PDF Dumps certification journey became a breeze with Certs4Exam. The comprehensive study materials and user-friendly interface make it a top choice.

Avatar_small
1Z0-1045-24 PDF Dump 说:
2024年5月28日 19:34

Very helpful tips. In addition, CertsQuestions offers fantastic 1Z0-1045-24 PDF Dumps resource that complement these strategies.

Avatar_small
1D0-1045-24-D Exam D 说:
2024年5月28日 19:36

This is really useful. I combined these insights with the 1D0-1045-24-D Exam Dumps practice from CertsQuestions, and it made a big difference.

Avatar_small
1Z0-1071-24 Exam Dum 说:
2024年5月28日 19:37

Awesome article! For anyone preparing for 1Z0-1071-24 Exam Dumps, CertsQuestions has a wealth of practice questions.

Avatar_small
Man Ring 说:
2024年6月24日 04:58

The quality of your craftsmanship shines through in every piece. It's evident that a lot of care goes into each creation.

Avatar_small
rings by pristine 说:
2024年6月24日 04:59

Your commitment to using ethically sourced materials is commendable. It's great to support businesses with a conscience.

Avatar_small
rose gold rings 说:
2024年6月24日 05:00

I appreciate how transparent you are about your production process. It builds trust with your customers.

Avatar_small
pink and orange biki 说:
2024年6月25日 02:36

I'm new to modeling, and your advice on posing is incredibly helpful.

Avatar_small
mens shapewear 说:
2024年6月25日 02:37

I never thought about using mannequins for practice. Brilliant idea!

Avatar_small
jumpsuits 说:
2024年6月25日 02:37

The photography tips you shared really improved my last photoshoot.

Avatar_small
age calculator 说:
2024年6月30日 20:09

I love how this Age Calculator can handle date ranges and cultural differences in age calculation.

Avatar_small
Date of birth calcul 说:
2024年6月30日 20:12

Ever wondered how old you are in days, months, and years? This tool has you covered!

Avatar_small
james 说:
2024年7月04日 20:10

CertsQuestions is your partner in achieving certification success.

Avatar_small
cedar chips for indo 说:
2024年7月10日 22:47

I recently discovered Double Tree Fatwood for my fireplace needs, and it has been a game-changer!

Avatar_small
cedarwood chips 说:
2024年7月10日 22:49

If you’re looking for high-quality fatwood, check out Double Tree Fatwood. Their products are top-notch.

Avatar_small
clutchvape 说:
2024年7月16日 21:01

Hi there! I'm Ameliamia, a passionate digital marketer fueling the growth of clutchvape.ca. With a keen eye for trends and a knack for strategy, I thrive in crafting impactful online campaigns, optimizing SEO, and driving conversions. Dedicated to delivering exceptional results, I combine creativity with data-driven insights to make clutchvape soar in the digital landscape. Let's connect and take your brand to new heights!


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter