早上修改 nginx 配置后,检查配置是否正常,抛出错误内容:
$ sudo nginx -t
nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_image_filter_module.so" version 1016001 instead of 1020001 in /usr/share/nginx/modules/mod-http-image-filter.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed
解决方案:
sudo yum update nginx nginx-mod-http-image-filter
// 该命令会同步更新相关依赖的动态模块
更新成功后执行检查,一切正常
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful