我的应用程序使用rails 3.2和ruby 1.9,必须在我的系统上使用https://welcome.com这样的域名运行https应用程序.所以我通过为域名和https创建ssl证书来配置我的nginx
短信的短信:
# HTTPS server
#
server {
listen 443 ssl;
server_name welcome.com;
root html;
index index.html index.htm;
ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
ssl_session_timeout 5m;
}
Run Code Online (Sandbox Code Playgroud)
我可以通过调用welcome.com和https://welcome.com查看nginx主页.没有运行rails应用程序
我的应用程序也成功运行在端口443中,但在浏览器中查询后,如https://welcome.com
Rails终端显示错误:
ERROR bad Request-Line `\x16\x03\x01\x00?\x01\x00\x00?\
ERROR bad URI `._i\b8\x10?yA?^6?v?M|
Run Code Online (Sandbox Code Playgroud)
在浏览器抛出错误:
SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)
Run Code Online (Sandbox Code Playgroud)
甚至尝试过重复清除浏览器历史记录,但结果是一样的.
我不确定我做错了什么,任何人都可以帮助我吗?
我在证书创建方面有任何错误吗?
我是ADFS的新手.我需要通过node.js访问ADFS服务器.我正在寻找好的参考笔记,并实施.并建议我哪种协议最适合请求.视频教程也很有用.
我正在编写Node.js应用程序,并尝试集成ADFS服务器以获取身份验证.为此,我正在使用wstrust-client,并使用ADFS服务器URL作为我的端点.到目前为止我的代码是:
app.get('/login', function(req, res) {
trustClient.requestSecurityToken({
scope: 'https://mycompany.com',
username: "username",
password: "password",
endpoint: 'https://[adfs server]/adfs/services/trust/13/usernamemixed'
}, function (rstr) {
// Access the token
var rawToken = rstr.token;
console.log('raw: ' + rawToken);
}, function(error) {
console.log(error)
});
});
Run Code Online (Sandbox Code Playgroud)
我正在通过https请求wstrust-client
wstrustclient.js到目前为止,我的代码是:
var req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function(data) {
console.log("Entered res")
var rstr = {
token: parseRstr(data),
response: res,
};
callback(rstr);
});
});
req.write(message);
req.end();
req.on('error', function (e) {
console.log("******************************");
console.log(e);
console.log("******************************"); …Run Code Online (Sandbox Code Playgroud)