报错锦集二“nginx: [emerg] unknown directive “set_real_ip_from“ in /usr/local/nginx/conf/nginx.conf:50 ngi
报错锦集二“nginx: [emerg] unknown directive "set_real_ip_from" in /usr/local/nginx/conf/nginx.conf:50 nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed”的报错解决方法
- 报错描述
- 问题描述
- 原因分析
- 解决方法
- 问题解决
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed”的报错解决方法)
报错描述
nginx: [emerg] unknown directive “set_real_ip_from” in /usr/local/nginx/conf/nginx.conf:50
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
问题描述
我在做一台nginx对应两台动态处理的服务Tomcat的时候,修改nginx配置文件出现如下报错
[root@localhost local]# nginx -t
nginx: [emerg] unknown directive "set_real_ip_from" in /usr/local/nginx/conf/nginx.conf:50
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
[root@localhost local]#
原因分析
因为nginx缺少了realip模块
解决方法
重新添加realip模块编译
--with-http_realip_module
重新编译
./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module --with-http_realip_module make && make install
问题解决
[root@localhost nginx-1.15.9]# nginx -t
nginx: [warn] low address bits of 192.168.56.1/24 are meaningless in /usr/local/nginx/conf/nginx.conf:50
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
报错锦集二“nginx: [emerg] unknown directive “set_real_ip_from“ in /usr/local/nginx/conf/nginx.conf:50 ngi相关推荐
- 报错集“nginx: [emerg] unknown directive “set_real_ip_from“ in /usr/local/nginx/conf/nginx.conf:50 ngi
报错集"nginx: [emerg] unknown directive "set_real_ip_from" in /usr/local/nginx/conf/ngin ...
- Nginx解决配置SSL证书报错:nginx: [emerg] unknown directive “ssl_certificate1“ in /usr/local/nginx/conf/ngi...
前段时间自己尝试了下Nginx的反向代理, 将请求转发到Tomcat上; 应公司项目需要就自己研究了下配置添加证书, 实现https的请求; 我的证书是从阿里云买的免费的证书, 按照阿里云的提示, 将 ...
- nginx: [emerg] unknown directive ssl Nginx配置SSL报错
配置环境: nginx:1.8.0版本 CentOS: 6.8版本 问题描述: 本人是在使用nginx 访问方式由http转成https过程中出现的以下问题,参考的是该博文完美解决,大家有什么问题可以 ...
- nginx: [emerg] unknown directive “stub_status“ in /app/nginx/conf/conf.d/state.conf:7
文章目录 一 发现问题 二 解决问题 1)找到编译安装时的nginx软件包,解压 2)配置相关参数 3)编译,安装 4)创建软链接和环境变量 5)确保配置文件正确 6)查看nginx进程 7)发送US ...
- Nginx:[emerg] unknown directive “server” in*******
Nginx:[emerg] unknown directive "server" in******* 今天在Window 下用记事本 编辑 了nginx.conf 文件后保存.启动 ...
- 问题解决:“nginx: [emerg] unknown directive “ “ in /etc/nginx/conf.d/XXX.conf:122”
nginx: [emerg] unknown directive " " in /etc/nginx/conf.d/XXX.conf:122 总结: 该问题为文本从Windows中 ...
- Nginx配置SSL证书时——nginx:[emerg]unknown directive ssl错误
一.引言 当我们的Linux服务器上当中发布了web项目,有时候需要配置一个SSL证书,这样表示你这个网站还比较正式哈哈哈.当我把证书下载好,把nginx.conf配置好,简直就是万事俱备,只欠重启. ...
- 使用nginx问题记录(1):2021-03-29 nginx: [emerg] unknown directive “锘? in C:\nginx-1.16.1/conf/nginx.conf:3
当我们遇到这种坑点的时候.nginx: [emerg] unknown directive "锘? in C:\nginx-1.16.1/conf/nginx.conf:3 说明我们的编码有 ...
- nginx中配置gzip_static on提示nginx: [emerg] unknown directive “gzip_static“ in
通过nginx配置开启解压缩静态文件gzip_static on后,启动nginx会提示nginx: [emerg] unknown directive "gzip_static" ...
最新文章
- 美媒预测:2021年人工智能的四大趋势
- htaccess分布式配置文件常用写法
- SHELL syntax error:unexpected end of file 提示错误
- chapter15 机器学习之大数据与mapreduce
- 【转】ZooKeeper原理及使用
- ESX 4 无法启动vSphere Web Access
- 深度学习之pytorch(一) 环境安装
- 计算机科学学院陈瑜,浙江大学城市学院计算机与计算科学学院 计算机科学与技术 陈则伦...
- mysql 过滤单引号_python实现mysql的单引号字符串过滤方法
- c语言设计阶段作业答案,C语言程序设计阶段考试练习题(答案)
- python 列表操作详解,Python列表解析操作实例总结
- 文件/目录权限设置命令:chmod
- 若依源码学习7:Excel 导入导出
- 【CCF】关于NOI Online测试有关事项的问答
- 分享一下申请CSDN博客专家成功后的好处
- 干货 :送你一份使用k近邻算法实现回归的实用指南(附代码、链接)
- java tic tac toe_确定Tic Tac Toe游戏的算法
- 编程训练4-统计单词平均长度
- Cibersort 算法 分析肿瘤样本免疫细胞组分
- 九、CompletableFuture异步编排