LANCommander.Servers.Base/nginx.conf

49 lines
1 KiB
Nginx Configuration File

user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
server {
listen 80;
server_name _;
root {{HTTP_FILESERVER_WEB_ROOT}};
index index.html index.htm;
# Enable directory listing for file downloads
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
# Security: deny access to hidden files
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
# File pattern filter (if configured)
{{HTTP_FILESERVER_FILE_PATTERN_FILTER}}
# Allow anonymous access
location / {
try_files $uri $uri/ =404;
}
}
}