nginx官网上有各式各样的第三方模块,今天来介绍一款叫做ngx_http_circle_gif_module。从字面意思来看,他是一个声称圆形图片的模块,实际上也是如此。此模块生成图片比直接在硬盘上读取要快很多,并且可以不用劳烦美工去设计。或者说不用麻烦同学用windows下的画图去话一个圆.功能很简单,指令也很简单。
安装模块参数
--add-module=path/to/circle_gif/directory
具体方法就不在讲述了,可以参考运维生存时间的《如何安装nginx第三方模块》文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
circle_gif指令
circle_gif
语法: circle_gif
默认值: n/a
配置段: location文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
circle_gif_min_radius
语法: circle_min_radius
默认值: 10
配置段: location
圆形的最小半径, 单位为像素文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
circle_gif_max_radius
语法: circle_max_radius
默认值: 20
配置段: location
圆形的最大半径, 单位为像素文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
circle_gif_step_radius
语法: circle_step_radius
默认值: 2
配置段: location
The "step" in between generated circle images文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
circle_gif配置
location /ttlsa_circles {
circle_gif;
}文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
circle_gif用法
<背景颜色>/<前景色>/<半径>.gif文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
例子
http://test.ttlsa.com/ttlsa_circles/ffffff/000000/20.gif文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
ffffff:背景色是白色
000000:前景色是黑色
20:圆形半径为20文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
circle_gif效果图
文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
参考地址
nginx_circle_gif下载:https://github.com/evanmiller/nginx_circle_gif/文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
nginx_circle_gif文档:http://wiki.nginx.org/HttpCircleGifModule文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
站点:运维生存时间 网址:https://www.ttlsa.com/html/3942.html文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/ 文章源自运维生存时间-https://www.ttlsa.com/nginx/nginx-modules-ngx_http_circle_gif_module/
1F
[…] 14. nginx不记录特定日志(access_log_bypass_if) 15. nginx快速绘制圆形图(ngx_http_circle_gif_module模块) 16. nginx实现大小写字母转换(ngx_http_lower_upper_case模块) 17. […]
来自外部的引用