Nginx Intro

来源:互联网 发布:js写网站好不好 编辑:程序博客网 时间:2024/06/04 20:12


#!/bin/sh



cd nginx-1.11.6


./configure --prefix=/opt/nginx \
   --add-module=../nginx_mod_h264_streaming-master \
   --add-module=../nginx-rtmp-module-master \
   --with-http_flv_module --with-http_mp4_module \
   --with-http_stub_status_module --with-http_sub_module \
   --with-pcre=../pcre-8.39 --with-zlib=../zlib-1.2.8  \
   --with-http_ssl_module --with-openssl=/usr/local \
   --with-http_realip_module --with-debug --user=www --group=www


#make clean
#make -j4 || exit 1

#sudo make install



############################################################

1. nginx-config.sh


#!/bin/sh


cd nginx-1.11.6


./configure --prefix=/opt/nginx \
   --add-module=../nginx_mod_h264_streaming-master \
   --add-module=../nginx-rtmp-module-master \
   --add-module=../nginx-my-module \
   --with-http_flv_module --with-http_mp4_module \
   --with-http_stub_status_module --with-http_sub_module \
   --with-pcre=../pcre-8.39 --with-zlib=../zlib-1.2.8  \
   --with-http_ssl_module --with-openssl=/usr/local \
   --with-http_realip_module --with-debug --user=www --group=www


#make clean
#make -j4 || exit 1
#sudo make install


2. config file in nginx_my_module directory

ngx_addon_name=ngx_http_helloworld_module
HTTP_MODULES="$HTTP_MODULES ngx_http_helloworld_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_helloworld_module.c"


3. ngx_http_helloworld_module.c file in nginx_my_module directory

0 0