This repository has been archived on 2020-07-12. You can view files and clone it, but cannot push or open issues or pull requests.
deluge/nginx.conf

55 lines
1.3 KiB
Nginx Configuration File
Raw Normal View History

2020-06-03 21:17:17 +02:00
# vim: set et sts=4 sw=4 ts=4:
user www-data;
2020-06-03 21:17:17 +02:00
worker_processes auto;
pid /run/nginx.pid;
error_log /dev/stderr warn;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
client_max_body_size 32M;
2020-07-09 20:24:28 +02:00
client_body_buffer_size 32M;
proxy_max_temp_file_size 0;
2020-06-03 21:17:17 +02:00
server {
listen unix:/var/run/nginx.sock;
server_name localhost;
location / {
proxy_pass http://127.0.0.1:8112/;
add_header X-Frame-Options SAMEORIGIN;
# this is NOT authentication (it is in a public git repository
# after all), it is only meant to avoid automatic scans
if ($cookie_preauth != "correct horse battery staple") {
return 404;
}
}
location /download/ {
alias /download/;
autoindex on;
auth_basic "go away";
auth_basic_user_file /config/htpasswd;
}
location /metrics {
2020-07-12 09:46:22 +02:00
proxy_pass http://0.0.0.0:9354/metrics;
2020-06-03 21:17:17 +02:00
auth_basic "go away";
auth_basic_user_file /config/htpasswd;
}
}
}