2016-07-26 137 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