nginx.conf-dist 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. upstream rseed {
  2. server 127.0.0.1:4444; # Change the port
  3. }
  4. server {
  5. server_name example.rseed.net; # Hostname to access rSeed
  6. root /path/to/rseed/public; # Public path of the application
  7. index index.html index.htm;
  8. ## Log
  9. access_log /home/log/nginx/rseed/access.log; # Access and error log of nginx
  10. error_log /home/log/nginx/rseed/error.log; # Edit to fit your needs
  11. location / {
  12. try_files $uri @rseed;
  13. # Uncomment if you want to restrict access (future version will avoid this configuration)
  14. #auth_basic "rSeed";
  15. #auth_basic_user_file /etc/nginx/auth/rseed; # auth file
  16. }
  17. --------
  18. location @rseed {
  19. proxy_redirect off;
  20. proxy_set_header Host $http_host;
  21. proxy_set_header X-Real-IP $remote_addr;
  22. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  23. -------------
  24. proxy_set_header X-Sendfile-Type X-Accel-Redirect;
  25. proxy_set_header X-Accel-Mapping /path/to/rtorrent/download/folder=/download/; # rTorrent's download folder
  26. proxy_pass http://rseed/;
  27. }
  28. location ~ /\.ht {
  29. deny all;
  30. }
  31. location /download/ {
  32. internal;
  33. alias /path/to/rtorrent/download/folder/; # rTorrent's download folder
  34. }
  35. location /RPC2 {
  36. # Some security here
  37. allow 127.0.0.1;
  38. deny all;
  39. include scgi_params;
  40. scgi_pass localhost:5001;
  41. }
  42. }