在Chef服务器上禁用SSL?
我在/etc/opscode/chef-server.rb文件中设置了nginx ['enable_non_ssl'] = true,并运行了chef-server-ctl reconfigure,但是当我尝试curl chef的http端口时,我仍然会被重定向,这有点违背了这个设置的目的。请查看以下错误。
我的chef-server.rb文件:
cat /etc/opscode/chef-server.rb
nginx['enable_non_ssl']=true
nginx['non_ssl_port']=80
运行重新配置:
chef-server-ctl reconfigure
Starting Chef Client, version 12.0.3
resolving cookbooks for run list: ["private-chef::default"]
[2015-05-25T13:12:26+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-05-25T13:12:26+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-05-25T13:12:26+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
....
Curl命令显示我仍然被重定向:
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>openresty/1.7.10.1</center>
</body>
</html>
如何使chef-server工作?
将下面翻译成中文并且保留原本的 markdown 格式
`The change in the chef-server.rb file made the url as http but when I logged in prompted again for https login means; user login is twice once in http and once in https.
let me know if you had a chance to try this and any success in the configuration as HTTP Instance Thanks in advance.`
在 chef-server.rb 文件中更改了 URL 为 HTTP,但是当我登录时,又提示我进行 HTTPS 登录,这意味着用户登录了两次,一次是 HTTP,一次是 HTTPS。
如果您有机会尝试一下此配置,并且有成功的经验,请提前告诉我。谢谢!
因此,我调查了这个问题并发现以下内容:
除了 Nginx 外,WebUI chef-manage 使用 Unicorn web 服务器,并且该应用程序具有属性 config.force_ssl=true,除非环境变量 ENV['NO_SSL']。
因此,要禁用 SSL,您需要将环境变量 export NO_SSL=true 传递给 WebUI 的运行命令或运行脚本。
- 如何将两个不同的lua文件合成一个 东西有点长 大佬请耐心看完 我是小白研究几天了都没搞定
- 如何在roblox studio中1:1导入真实世界的地形?
- 求解,lua_resume的第二次调用继续执行协程问题。
- 【上海普陀区】内向猫网络招募【Skynet游戏框架Lua后端程序员】
- SF爱好求教:如何用lua实现游戏内调用数据库函数实现账号密码注册?
- Lua实现网站后台开发
- LUA错误显式返回,社区常见的规约是怎么样的
- lua5.3下载库失败
- 请问如何实现文本框内容和某个网页搜索框内容连接,并把网页输出来的结果反馈到另外一个文本框上
- lua lanes多线程使用
- 一个kv数据库
- openresty 有没有比较轻量的 docker 镜像
- 想问一下,有大佬用过luacurl吗
- 在Lua执行过程中使用Load函数出现问题
- 为什么 neovim 里没有显示一些特殊字符?
- Lua比较两个表的值(不考虑键的顺序)
- 有个lua简单的项目,外包,有意者加微信 liuheng600456详谈,最好在成都
- 如何在 Visual Studio 2022 中运行 Lua 代码?
- addEventListener 返回 nil Lua
- Lua中获取用户配置主目录的跨平台方法
来自 Chef 的相关设置:
nginx['enable_non_ssl']nginx['non_ssl_port']根据上述信息,我认为您需要编辑/创建 /etc/opscode/ 目录下的
chef-server.rb文件,然后运行chef-server-ctl reconfigure。