In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to compile links in Nginx. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Nginx organization process
/ auto/configure (get the configuration of configure and generate Makefile)
Objs/Makefile (generated by the first step)
Make (* .o generated, connected as nginx)
Demonstrate the connection process of http geo module
1.configure
Path:auto/configure
. Auto/options...2.options parameter
Path: auto/option
Path: auto/modules
Whether a configuration is enabled or not
-without-stream_geo_module disable ngx_stream_geo_module-with-debug enable debug logging
The HTTP_GEO variable is set to YES and the geo module is turned on.
If [$HTTP_GEO = YES]; then have=NGX_HTTP_X_FORWARDED_FOR. Auto/have ngx_module_name=ngx_http_geo_module ngx_module_incs= ngx_module_deps= ngx_module_srcs=src/http/modules/ngx_http_geo_module.c ngx_module_libs= ngx_module_link=$HTTP_GEO. Auto/module fi3.objs/ngx_modules.c
Extern declares the target module (geo, custom module)
Ngx_modules: registration module
Ngx_module_names: define the module name
4.objs/Makefile
Compile target .o
Connect target .o to nginx
Generation of eg:ngx_http_geo_module.o module
Objs/src/http/modules/ngx_http_geo_module.o: $(CORE_DEPS) $(HTTP_DEPS)\ src/http/modules/ngx_http_geo_module.c $(CC)-c $(CFLAGS) $(CORE_INCS) $(HTTP_INCS)\-o objs/src/http/modules/ngx_http_geo_module.o\ src / http/modules/ngx_http_geo_module.c5. Verify that the target module is connected in the nginx
Ngx_http_geo_module
Ngx_http_mytest_module (Custom Module)
➜nginx git: (hyh_test) ✗ nm objs/nginx | grep geo_mod00000001000a5420 D _ ngx_http_geo_module00000001000bdf68 b _ ngx_http_geo_module_ctx➜ nginx git: (hyh_test) ✗ ➜nginx git: (hyh_test) ✗ nm objs/nginx | grep mytest 0000000100071860 t _ ngx_http_mytest_block00000001000a5500 d _ ngx_http_mytest_commands00000001000a5570 D _ ngx_http_mytest_module00000001000bdfb8 b _ ngx_http_mytest_module_ctx➜ nginx git: (hyh_) Test) ✗ 's article on "how Nginx compiles connections" ends here. Hope that the above content can be helpful to you, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.