50 lines
928 B
Markdown
50 lines
928 B
Markdown
|
||
|
||
|
||
```nginx
|
||
|
||
http {
|
||
limit_conn_zone $binary_remote_addr zone=limitperip:10m;
|
||
|
||
#large_client_header_buffers 2 1k;
|
||
large_client_header_buffers 4 8k;
|
||
|
||
#keepalive_timeout 55;
|
||
keepalive_timeout 60s;
|
||
|
||
#client_header_timeout 10;
|
||
client_header_timeout 20s;
|
||
|
||
#client_header_buffer_size 1k;
|
||
client_header_buffer_size 4k;
|
||
|
||
#client_body_buffer_size 1K;
|
||
client_body_buffer_size 16k;
|
||
|
||
#client_max_body_size 1k;
|
||
client_max_body_size 50m;
|
||
|
||
server_tokens off; # Disable version information globally
|
||
|
||
#client_body_timeout 10;
|
||
client_body_timeout 60s;
|
||
|
||
#send_timeout 10;
|
||
send_timeout 60s;
|
||
|
||
server {
|
||
#limit_conn limitperip 10;
|
||
if ( $http_referer ~* (babes|forsale|girl|jewelry|love|nudit|organic|poker|porn|sex|teen) ) {
|
||
return 403;
|
||
}
|
||
location / {
|
||
limit_conn limitperip 10;
|
||
if ($request_method !~ ^(GET|HEAD|POST|PUT|DELETE)$) {
|
||
return 405; # Method Not Allowed
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
```
|