tar.gz //创建目录 mkdir nginx //>>安装一个第三方模块,可以打印输出一些东西,一般用于调试nginx的参数时使用(也可以不安装) //>>创建一个模块目录 用于放第三方模块 mkdir nginx-module //>>进入目录: cd nginx-module //>>下载: wget https://github.com/openresty/echo-nginx-module/archive/v0.60. /configure --prefix=/usr/local/server/nginx --add-module=/usr/local/server/nginx-module/echo-nginx-module
tracker mkdir -p /var/lib/fast-dfs/storage mkdir -p /var/lib/fast-dfs/client mkdir -p /var/lib/fast-dfs/nginx-module mod_fastdfs.conf 修改配置文件/etc/fdfs/mod_fastdfs.conf: 将: base_path=/tmp 改为: base_path=/var/lib/fast-dfs/nginx-module
tracker mkdir -p /var/lib/fast-dfs/storage mkdir -p /var/lib/fast-dfs/client mkdir -p /var/lib/fast-dfs/nginx-module mod_fastdfs.conf 修改配置文件/etc/fdfs/mod_fastdfs.conf: 将: base_path=/tmp 改为: base_path=/var/lib/fast-dfs/nginx-module
tracker mkdir -p /var/lib/fast-dfs/storage mkdir -p /var/lib/fast-dfs/client mkdir -p /var/lib/fast-dfs/nginx-module mod_fastdfs.conf 修改配置文件/etc/fdfs/mod_fastdfs.conf: 将: base_path=/tmp 改为: base_path=/var/lib/fast-dfs/nginx-module
test/ 随便上传一个文件到当前目录 测试一下 fdfs_test /etc/fdfs/client.conf upload /usr/local/test/shaun.jpg 成功 27.进入nginx-module
1.2.11 --with-openssl=/home/fly/workspace/openssl-1.1.0g --add-module=/mnt/hgfs/sourcecode_learning/nginx-module 出现如下表示成功:configuring additional modules adding module in /mnt/hgfs/sourcecode_learning/nginx-module/ngx_http_pagecount_module
location /nginx-module/echo { default_type 'text/html'; echo -n "Domain: demo.weiyigeek.top location /nginx-module/timed { default_type 'text/plain'; echo "Hello World! location /nginx-module/body { resolver 223.6.6.6; default_type 'text/html'; echo "Hello World www.WeiyiGeek.top'; echo_after_body '[END]'; } # 示例4.多次输出同一个字符串以及显示客户端请求header与请求body主体参数 location /nginx-module location ^~ /nginx-module/if { default_type 'text/plain'; set $res default; echo $arg_flag
to=https%3A%2F%2Fgithub.com%2Fhappyfish100%2Ffastdfs- nginx-module) 下载压缩包或者使用 git 命令下载,或者通过资源地址:https