mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Update example nginx configs to require Host match.
This commit is contained in:
parent
5a8b9555da
commit
2169b044d6
@ -39,9 +39,17 @@ An `example configuration`_ file for fast clients with Nginx_::
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default;
|
||||
# If no Host match, close the connection to prevent Host spoofing
|
||||
listen 80 default_server;
|
||||
return 444;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
client_max_body_size 4G;
|
||||
server_name _;
|
||||
|
||||
# set the correct host(s) for your site
|
||||
server_name example.com www.example.com;
|
||||
|
||||
keepalive_timeout 5;
|
||||
|
||||
|
||||
@ -70,12 +70,20 @@ http {
|
||||
}
|
||||
|
||||
server {
|
||||
# listen 80 default deferred; # for Linux
|
||||
# listen 80 default accept_filter=httpready; # for FreeBSD
|
||||
listen 80 default;
|
||||
# If no Host match, close the connection to prevent Host spoofing
|
||||
listen 80 default_server;
|
||||
return 444;
|
||||
}
|
||||
|
||||
server {
|
||||
# listen 80 deferred; # for Linux
|
||||
# listen 80 accept_filter=httpready; # for FreeBSD
|
||||
listen 80;
|
||||
|
||||
# set the correct host(s) for your site
|
||||
server_name example.com www.example.com;
|
||||
|
||||
client_max_body_size 4G;
|
||||
server_name _;
|
||||
|
||||
# ~2 seconds is often enough for most folks to parse HTML/CSS and
|
||||
# retrieve needed images/icons/frames, connections are cheap in
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user