upstream rseed { server 127.0.0.1:4444; # Change the port } server { server_name example.rseed.net; # Hostname to access rSeed root /path/to/rseed/public; # Public path of the application index index.html index.htm; ## Log access_log /home/log/nginx/rseed/access.log; # Access and error log of nginx error_log /home/log/nginx/rseed/error.log; # Edit to fit your needs location / { try_files $uri @rseed; # Uncomment if you want to restrict access (future version will avoid this configuration) #auth_basic "rSeed"; #auth_basic_user_file /etc/nginx/auth/rseed; # auth file } -------- location @rseed { proxy_redirect off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; ------------- proxy_set_header X-Sendfile-Type X-Accel-Redirect; proxy_set_header X-Accel-Mapping /path/to/rtorrent/download/folder=/download/; # rTorrent's download folder proxy_pass http://rseed/; } location ~ /\.ht { deny all; } location /download/ { internal; alias /path/to/rtorrent/download/folder/; # rTorrent's download folder } location /RPC2 { # Some security here allow 127.0.0.1; deny all; include scgi_params; scgi_pass localhost:5001; } }