我正试图在我的nginx中实现"ssl_preread“。我的nginx是用“- with -stream_ssl_preread_ module”这个模块编译的。
我在nginx.conf的服务器指令中提到了“nginx.conf on;”。但我的错误越来越少了。
在/opt/nginx/conf/nginx.conf:43中不允许使用emerg "ssl_preread“指令。
我跟在医生下面。
module.html
发布于 2018-01-11 06:59:38
-随流 -具有-stream_ssl_preread_模块
流{上游应用程序{服务器IP1 1:端口;服务器IP1 2:端口;} map $ssl_preread_server_name $upstream {默认应用程序;}服务器{侦听端口;ssl_preread on;proxy_pass $upstream;}}
这对我有用。如果这也适用于你,请告诉我。
发布于 2021-01-04 08:33:32
也许你需要更新Nginx的最新版本。1.10我也遇到了这个错误,但是1.18配置是可以的。
发布于 2021-05-07 08:50:08
也许这是一个迟来的答案。在从nginx 1.14 8.3repo安装CentOS时,我遇到了以下问题。
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] unknown "ssl_preread_server_name" variable\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',)
The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] unknown "ssl_preread_server_name" variable\nnginx: configuration file /etc/nginx/
nginx.conf test failed\n',)我通过升级最新的nginx-1:1.20.0-1.el8.ngx.x86_64来修复它,遵循下面的URL
packages.html#RHEL-CentOS
https://stackoverflow.com/questions/48171389
复制相似问题