2016-07-26 48 views
0

我已将cloudfront连接到使用ubuntu服务器14.04 ec2实例的负载均衡器。有时,当我在我的wordpress网站上浏览控制面板时,我只会得到一个空白页面,在进入下一页面之前,我必须先进入并等待大约30秒。这通常发生在“发布”请求之后。Cloudfront有时空白页

任何人有任何想法?我已经安装了一段时间没有问题,但在Ubuntu更新后,我的服务器爆炸了。我必须设置一些apache工作线程到一个较低的数字,设置一个MySQL交换,删除apport崩溃我的服务器。然后就像这个空白页面的事情发生在我身上一样。

我也改变了我的域名,所以我不得不重新基本上我在亚马逊所有的东西,但我双/三重检查它,这一切似乎像他们之前是正确的价值观。

这是我的CloudFront的设置,它的长

cloudfront settings general 

Distribution ID E11KP67NC8KZHO 
Log Prefix - 
Delivery Method Web 
Cookie Logging Off 
Distribution Status Deployed 
Comment - 
Price Class Use All Edge Locations (Best Performance) 
AWS WAF Web ACL - 
State Enabled 
Alternate Domain Names (CNAMEs) 
techstory2.com 
SSL Certificate techstory2.com (1f411465-1b8d-42a5-93f4-9cd663330e46) 
Domain Name d1cqn6ev1d7d25.cloudfront.net 
Custom SSL Client Support Only Clients that Support Server Name Indication (SNI) 
Default Root Object - 
Last Modified 2016-07-22 18:20 UTC-4 
Log Bucket 


Origins 
techstory2balan-595918364.us-east-1.elb.amazonaws.com 

ELB-techstory2balan-595918364  
Origin SSL Protocols 
TLSv1.2 enabled 
TLSv1.1 enabled 
TLSv1 enabled 
SSLv3 diabled 

Origin Protocol Policy 
HTTPS Only selected 

HTTP Port 
80 
HTTPS Port 
443 

Behaviours 
Path PatternDefault (*)  
Origin 
ELB-techstory2balan-595918364 
Viewer Protocol Policy 
Redirect HTTP to HTTPS 

Allowed HTTP Methods 
GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE 

Cached HTTP Methods 
GET, HEAD (Cached by default) 
OPTIONS 

Forward Headers 
All 

Minimum TTL 
0 

Maximum TTL 
31536000 

Default TTL 
86400 

Forward Cookies 
All 

Forward Query Strings 
Yes 

Smooth Streaming 
No 

Restrict Viewer Access 
No 

Compress Objects Automatically 
Yes 
+0

你还可以粘贴你正在使用的云端设置吗? – error2007s

+0

我在其中复制了云端设置 – shwick

回答

0

原来负载平衡器锤打我自己的EC2实例以每秒约20 command.php请求在我的Apache2/access.log里看到,

72.31.7.71 - - [25/Jul/2016:17:21:17 +0000] "POST /remote50/command.php?uid=12926 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=7668 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=7471 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=9595 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=7700 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=7356 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=7337 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=8858 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=6744 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=7757 HTTP/1.1" 500 780 "-" "-" 
::1 - - [25/Jul/2016:17:21:18 +0000] "OPTIONS * HTTP/1.0" 200 125 "-" "Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.17 OpenSSL/1.0.1f (internal dummy connection)" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=7305 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=7892 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=7214 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=7669 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=6415 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=8637 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=12586 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=8546 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=6124 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=7005 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=13623 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=8515 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=12445 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=9376 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=5569 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:18 +0000] "POST /remote50/command.php?uid=13800 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:19 +0000] "POST /remote50/command.php?uid=7296 HTTP/1.1" 500 780 "-" "-" 
172.31.7.71 - - [25/Jul/2016:17:21:19 +0000] "POST /remote50/command.php?uid=8520 HTTP/1.1" 500 780 "-" "-" 

为什么这样做,我不知道。我所知道的是我关闭负载均衡器和cloudfront,现在我的ec2实例正常工作。我会尝试删除,后来重建的负载均衡和CloudFront的,希望它不会自己的服务器下一次DDOS。

1

看起来你已经配置将源协议的政策仅HTTPS。这意味着当用户通过HTTPS访问CloudFront时,CloudFront将通过HTTPS与您的来源联系。我会建议从ELB级别重新检查SSL。

它的作品有时的原因是你的分布没有配置对协议有所不同,因此,如果用户通过HTTP的请求,上述目标将在CloudFront的缓存,也可以通过HTTPS提供。

  1. http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html
  2. https://www.ssllabs.com/ssltest/analyze.html?d=sociallyuncensored.com