NZBGet behind other web-server

From NZBGet
Jump to: navigation, search

Contents

External web-server

NZBGet has a built-in web-server for web-interface purposes. To access it you type the address of computer running NZBGet and the port configured in the options:

http://my-dns-address.com:6789/

If you already have a web-server you may want to integrate NZBGet into it:

http://my-dns-address.com/nzbget/

You need a web-server with proxy capabilities to achieve this.

Apache

Example configuration:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
...
<Location /nzbget>
  order deny,allow
  deny from all
  allow from all
  ProxyPass http://localhost:6789
  ProxyPassReverse http://localhost:6789
</Location>

In the fist line "<Location /nzbget>" you can replace "/nzbget" with anything else and then use this string in web-address.

NOTE: when typing the URL in web-browser you must type the trailing slash "/":

http://my-dns-address.com/nzbget/

If you omit it the web-interface will not load and will hang with "Loading... please wait..." message.

Lighttpd

Example configuration:

server.modules = (
     ...
     "mod_proxy",
     ...
     )

$HTTP["url" ] =~ "nzbget" {
  proxy.server = ( "" => (( "host" => "127.0.0.1", "port" => 6789 ) ) )
}

Lighttpd has limited proxy capabilities and cannot rewrite the URL. Because of this you can't change the path "nzbget" to anything else. For example "$HTTP["url" ] =~ "apps/nzbget" " wouldn't work. If you need more flexible setup you have to use a better web-server (apache, etc.).

Nginx

Example configuration:

server {
  ...
  location ~ ^/nzbget($|./*) {
    proxy_pass http://127.0.0.1:6789;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
  ...
}
Donation



Get NZBGet at SourceForge.net. Fast, secure and Free Open Source software downloads

Personal tools