-1
我在AWS EC2實例上有Ubuntu,Apache,Rails 4站點。我的網站工作正常,但現在說它與用戶過載。情況並非如此,因爲它是一個私人網站。 My-tail日誌顯示該網站不斷被請求以下重複的GET請求。日誌顯示來自未知IP的持續GET請求
I, [2015-04-01T21:37:43.996476 #1198] INFO -- : Rendered layouts/_google_analytics.html.erb (1.2ms)
I, [2015-04-01T21:37:43.997616 #1198] INFO -- : Completed 200 OK in 1155ms (Views: 1154.0ms | ActiveRecord: 0.0ms)
I, [2015-04-01T21:37:44.184503 #1198] INFO -- : Started GET "/" for 54.###.##.### at 2015-04-01 21:37:44 +0000
I, [2015-04-01T21:37:44.273012 #1198] INFO -- : Processing by HomeController#home_page as */*
I, [2015-04-01T21:37:44.733609 #1198] INFO -- : Rendered home/_sign_up_modal.html.erb (99.0ms)
I, [2015-04-01T21:37:44.860521 #1198] INFO -- : Rendered home/home_page.html.erb within layouts/application (585.2ms)
I, [2015-04-01T21:37:44.864389 #1198] INFO -- : Rendered /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/stripe-rails-0.3.1/app/views/stripe/_js.html.erb (3.1ms)
與每個請求唯一不同的是GET每次都來自不同的IP。 54。###。##。###每次都會改變。 他們都不是用戶,我相信這一點。
Started GET "/" for 54.###.##.### at 2015-04-01 21:37:44 +0000
這是某種負載攻擊嗎?我對此很陌生,並希望我提供足夠的信息來幫助,但如果我分享不夠,請提出更多要求。
/etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
ServerName ec2-54-###-###-##.us-west-2.compute.amazonaws.com
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /etc/projects/myapp/public
<Directory /etc/projects/myapp/public>
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
編輯
我每次加的https://wiki.apache.org/httpd/ProxyAbuse以下,但現在我收到「您沒有權限訪問/在此服務器上「。 /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
ServerName default.only
<Location />
Order allow,deny
Deny from all
</Location>
</VirtualHost>
<VirtualHost *:80>
ServerName ec2-54-##-###-##.us-west-2.compute.amazonaws.com
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /etc/projects/myapp/public
<Directory /etc/projects/myapp/public>
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
我認爲'54.x.x.x'是客戶端IP,它與您的服務器無關。 – Barmar 2015-04-01 21:42:09
如何阻止這些請求? – MicFin 2015-04-01 21:48:55
你不能。黑客會破解。 – Barmar 2015-04-01 21:49:24