Reverse Proxy Support - nosmokingbandit/watcher GitHub Wiki

Watcher can be served behind a reverse proxy such as Nginx or Apache. A few things must be adjusted to enable this.

This guide will create a basic reverse-proxy setup and may require different configuration depending on your specific environment.

Watcher

  • Open Settings > Server
  • Enable the option Use custom webroot and enter your desired path.

It is always wise, when exposing an application to the internet, to secure it. You can enable user/password verification in Settings > Server > Interface.

After this your webui will be available at http://address:port/watcher

Post-Processing

  • Open your Watcher post-processing script
  • Change the Watcher address/port to http://address:port/watcher

Nginx

Copy the following to your Nginx config.

location ~ ^/**location** {

    proxy_pass http://**ADDRESS**:**PORT**;

    proxy_pass_header  Set-Cookie;

    proxy_pass_header  P3P;

    proxy_set_header Host $host;

    proxy_set_header X-Real-IP $remote_addr;

    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}

Change *location*, *ADDRESS*, and *PORT* to the correct webroot, address, and port for your watcher server.