- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我创建了一个带有自动缩放组的负载均衡器。在我应用 SSL 证书并将流量重定向到 HTTPS 之前,它工作得非常好。负载均衡器运行状况检查是 http 一次,我无法将该检查移至 https,因为证书已应用于负载均衡器。所以当前的堆栈是 Rails 4.2,操作系统是 ubuntu,http entertainer 是 nginx,我有 5 个实例在 Load Balancer 上运行。所以我在 nginx 上创建了一个重定向,如下所示
if ($scheme = http) {
return 301 mydomain.com$request_uri;
}
然后我试了一下
if ($request_uri != "/public/health.html" ) {
set $balancer P;
}
if ($scheme = http) {
set $balancer "${balancer}C";
}
if ($balancer = PC) {
return 303 mydomain.com$request_uri;
}
由于这些重定向,我的网站出现故障,在浏览器上我遇到了多次重定向错误。这个问题让我发疯。请帮忙。非常感谢您的帮助。谢谢
最佳答案
我的 tomcat 服务器(实例)和 Apachae 服务器(负载平衡器)遇到了完全相同的问题。我也在浏览器中获得多个重定向。我做了两件事:
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule ssl_module modules/mod_ssl.so
听443
<VirtualHost *:80>
<Proxy *>
Order deny,allow
Allow from all
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
Rewriterule ^(.*)$ https://www.example.com/ [L,R=301]
</Proxy>
RequestReadTimeout header=35 body=35
ProxyPass / http://localhost:8080/ retry=0
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost on
ErrorLog /var/log/httpd/elasticbeanstalk-error_log
</VirtualHost>
<VirtualHost *:443>
RequestReadTimeout header=35 body=35
ProxyPass / http://localhost:8080/ retry=0
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost on
SSLEngine on
SSLCertificateFile /path/where/cert/stored/2_example.com.crt
SSLCertificateKeyFile /path/where/cert/stored/private-key.pem
SSLCertificateChainFile /path/where/cert/stored/1_root_bundle.crt
ErrorLog /var/log/httpd/elasticbeanstalk-error_log
</VirtualHost>
我保持端口 80 打开以进行健康检查,并保持端口 443 用于站点。此配置可能对您有所帮助。如果您能够解决您的问题,请告诉我。
关于ruby-on-rails - 应用 AWS SSL 证书后的负载均衡器健康检查,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38604743/
我在某处读到有一个 guiding principle将表中的行数限制在 100 万以下。我想知道这是不是真的。对于我拥有的一个项目,我将大致拥有分别包含 10,000 行、40,000 行、160,
我是一个相当新的程序员和经验丰富的运行者,一直在研究 Garmin Health API 并计划制作一个应用程序。我的第一个想法是在完成 10x400 米之后简单地获得平均时间,这是我几乎每个月都会做
for ($i=1; $i query("UPDATE `jpa` SET `war` = $b WHERE `id` = $a"); $mysqli->query("UPDATE `
我使用 Samsung S Health SDK 开发了我的应用程序。我想在我的应用程序中添加 S 健康的步行、运行和骑自行车跟踪。 如何添加这些功能? 最佳答案 我在 readTodayWalkin
到目前为止,我知道 EOF 是一个特殊字符,自动插入到文本文件的末尾以指示其结束。但我现在觉得需要对此进行更多澄清。我在 Google 和 Wikipedia 页面上查看了 EOF,但他们无法回答以下
假设我选择了一个随机来源,例如 CNN。根据关键字自动将抓取的文章分类,或者针对不同的类别抓取网站的各个部分,例如 cnn.com/tech 或/entertainment,这样会更有利吗?第二个选项
我在我的 Spring Boot + Spring Cloud 项目中使用 ConfigServer。我曾经监控端点/health,但由于 ConfigClient 在每个请求中询问 ConfigSe
对 projectname.appspot.com/_ah/health 的请求返回以下错误 { "code": 5, "message": "Method does not exist.",
我想检查我的服务的健康状况,了解每个端点的指标。我的服务调用其他一些服务并接收 Json 代码,我用它制作模板,然后将它发送到 http.ResponseWriter。 我搜索并找到了这个包“gocr
我在 javascript (React.j) 中编写了以下使用 for 循环的函数: getOpponentTeam: function(playerTeamId){ var matches =
我是 codeigniter 的新手,我想通过传递许多条件来选择用户的详细信息。我通过了一些条件,例如: $this->db->where ( 'userprofile.Disability', $
我有一个在 pm2 上运行的 nodejs 应用程序,我需要能够在发生崩溃/重启时发送电子邮件通知。我的想法是监视应用程序的崩溃并从 pm2-health 触发邮件操作。 pm2-health 模块的
我正在尝试使用 Jsoup 库(版本 1.11.3)读取域 - iv4u.health 的 URL 正文,但出现“重定向过多”错误。下面是我正在使用的代码 - public class Example
我是一名优秀的程序员,十分优秀!