1
Fork 0
slides/nginx.conf

60 lines
1.0 KiB
Nginx Configuration File

server {
listen 80;
root /srv;
access_log /dev/stdout;
error_log /dev/stderr;
keepalive_timeout 65;
sendfile_max_chunk 1m;
gzip_static off;
gzip on;
gzip_types *;
# brotli
brotli on;
brotli_static on;
# IP detection
set_real_ip_from 0.0.0.0/0;
real_ip_header X-Forwarded-For;
index index.html;
try_files $uri $uri/ =404;
error_page 403 =404 /404.html;
# Kick malicious clients sooner
client_header_timeout 10s;
client_body_timeout 10s;
client_max_body_size 128k;
reset_timedout_connection on;
# Expose WebDAV on a sub-path
location /.dav/ {
alias /srv/;
auth_basic_user_file /etc/nginx/.htpasswd;
auth_basic "Restricted";
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
min_delete_depth 1;
client_body_temp_path /tmp;
create_full_put_path on;
}
# Healthcheck endpoint
location /.ping {
access_log off;
return 200;
}
js_import slides.js;
location = /sitemap.xml {
js_content slides.sitemap;
}
}