kemono2/nginx.conf

50 lines
1.1 KiB
Nginx Configuration File
Raw Normal View History

2024-07-04 22:08:17 +02:00
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
resolver 127.0.0.11;
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log off;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
server {
root /storage;
client_max_body_size 100m;
location ~ "^/archive_files/([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{60})\.(.*)" {
proxy_pass http://foobar:5000/extract/data/$1/$2/$1$2$3.$4$is_args$args;
}
location / {
try_files $uri @kemono;
if ($arg_f) {
add_header Content-Disposition "inline; filename=$arg_f";
}
}
location @kemono {
proxy_pass http://web;
}
}
}