Skip to content

Instantly share code, notes, and snippets.

@wader
Last active August 29, 2015 14:22
Show Gist options
  • Save wader/46f380b86b4bb0112e73 to your computer and use it in GitHub Desktop.
Save wader/46f380b86b4bb0112e73 to your computer and use it in GitHub Desktop.
nginx webdav and tranmission
server {
listen 80;
server_name bla;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name bla;
access_log off;
root /var/www;
index index.html;
satisfy any;
#allow 10.0.0.0/8;
auth_basic "bla";
auth_basic_user_file /etc/nginx/htpasswd/bla.htpasswd;
ssl_certificate /etc/nginx/ssl/bla.se_bundle.crt;
ssl_certificate_key /etc/nginx/ssl/bla.se.key;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_ciphers 'AES128+EECDH:AES128+EDH';
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
location /media {
alias /mnt/media;
autoindex on;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
charset utf-8;
access_log off;
}
location /transmission {
proxy_pass http://127.0.0.1:9091;
access_log off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment