gradido/deployment/bare_metal/nginx/sites-available/update-page.conf.ssl.template
2024-08-09 10:53:56 +02:00

50 lines
1.1 KiB
Plaintext

include /etc/nginx/common/limit_requests.conf;
server {
if ($host = $COMMUNITY_HOST) {
return 301 https://$host$request_uri;
}
server_name $COMMUNITY_HOST;
listen 80;
listen [::]:80;
return 404;
}
server {
server_name $COMMUNITY_HOST;
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate $NGINX_SSL_CERTIFICATE;
ssl_certificate_key $NGINX_SSL_CERTIFICATE_KEY;
include $NGINX_SSL_INCLUDE;
ssl_dhparam $NGINX_SSL_DHPARAM;
include /etc/nginx/common/protect.conf;
include /etc/nginx/common/protect_add_header.conf;
# protect from slow loris
#client_body_timeout 10s;
#client_header_timeout 10s;
# protect from range attack (in http header)
if ($http_range ~ "d{9,}") {
return 444;
}
gzip on;
root $NGINX_UPDATE_PAGE_ROOT;
index updating.html;
location / {
#limit_req zone=frontend;
#limit_conn addr 10;
try_files /updating.html =404;
}
access_log $GRADIDO_LOG_PATH/nginx-access.update-page.log gradido_log;
error_log $GRADIDO_LOG_PATH/nginx-error.update-page.log warn;
}