首页 > 最新小说 > 雍正王朝

今日看世界

Nginx防慢连接攻击实战:几行配置挡住Slowloris_我的网站

请回答1997

A |     The announcement was handed down by the Prussian Cultural Heritage Foundation, which approved 24 objects for return, including jewelry, tools, and fashion items.,“The decision makes clear that the issue of the return of items collected in a colonial context does not always come down to injustice,” foundation president Hermann Parzinger said in a statement. “The special significance – in particular spiritual – of an artifact for the community it originated from may also justify return.”,Included on the list is the shell-studded statue of Ngonnso’, the mother goddess of the Nso’ people of northwestern Cameroon, which was “donated” to Berlin’s Ethnological Museum in 1903 by a German military officer.,Also included were objects seized during the Maji Maji Rebellion, an anti-colonial upheaval that rocked German East Africa, a territory including modern-day Tanzania, Burundi and Rwanda, from 1905 to 1907. As many as 300,000 Africans were killed in Germany’s suppression of the uprising.,In May, the museum announced it was sending 23 stolen artifacts to Namibia on long-term loan, but was not returning them outright. Berlin reached a deal last year to admit it committed genocide against Namibia’s Herero and Nama peoples from 1904 to 1908, when they rose up against German colonization and were driven off their land and into the desert as punishment. The deal includes a $1.4 billion payment to Namibia, but the descendants of those who survived have called it insufficient to right the wrongs committed.,Germany to Pay Namibia $1.3Bln in Recognition of 20th Century Genocide28 May 2021, 07:13 GMT,Germany has also pledged to send other artifacts back to Africa, including the famous Benin Bronzes, intricate sculptures taken from the Kingdom of Benin, which is today part of Nigeria, despite the existence of the country of Benin, which was a German colony.,A study commissioned by the French government in 2018, another former major colonial power in Africa, found that more than 90% of African art is housed in museums outside the continent. However, even in Europe, much of the art pillaged by the Nazis in their continent-spanning wars in the 1930s and 1940s also has not been returned and continues to be traded.,The news also comes as the remains of Patrice Lumumba, the architect of Congo-Kinshasa’s independence and the country’s first leader, were returned to the Democratic Republic of the Congo by Belgium, the former colonial ruler. Lumumba was assassinated by the US and Belgian governments in 1961 for his left-wing politics. His remains have been prepared for burial in Haut-Katanga for June 30, which is DR Congo’s independence day.。    

     一键部署OpenClaw        做站长最怕的不是没流量,是服务器莫名其妙瘫了。Slowloris 这类慢连接攻击不发送大量请求,而是故意把连接拖住,耗光 Nginx 的 worker 进程。你的网站可能瞬间从“打不开”变成完全无响应。    

         应对思路很简单:给连接设置合理的超时阈值。客户端发完头部就超时、发body 也超时、整体发送还超时,三个时间窗口一收紧,攻击者就没了拖下去的空间。    http {    client_header_timeout 10s;   #读取请求头超时时间    client_body_timeout  10s;    #读取请求体超时时间    send_timeout         10s;    #发送响应超时时间    keepalive_timeout    30s;    #长连接保持时间         #限制单IP连接数,进一步压制慢连接    limit_conn_zone $binary_remote_addr zone=addr:10m;    server {    limit_conn addr 30;    }    }    这里的时间值不是越小越好。如果你的接口有上传大文件的功能,client_body_timeout 可以放宽到 60 秒,甚至针对上传路径单独写一个 location。

B | 核心原则是:正常用户用不上那么长时间。    配置改完后用nginx -t 检查语法,reload 平滑生效。可以用 slowhttptest 工具自己压测一下,看改成 10 秒后连接还能不能被挂住。

C | 真实业务里我习惯把这几个值默认设为 10 秒,上传接口单独放开。

        
    

申请创业报道,分享创业好点子。点击此处,共同探讨创业新机遇!。

Current article:http://www.kelozhaichongbaoshuo.pics/uo8h88/2egr7u.html

Published on:18:10:31