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

53 lines
1.2 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;
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;
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 {
proxy_pass http://localhost:9354/metrics;
auth_basic "go away";
auth_basic_user_file /config/htpasswd;
}
}
}