scanservjs

SANE scanner nodejs web ui

Getting started

Installation and setup

  1. Standard install
  2. Docker install
  3. SANE setup install
  4. Troubleshooting

Configuration

  1. Configuration
  2. Integration
  3. Recipes
  4. Using a proxy

Developing

  1. Development
  2. Localisation
  3. Testing
  4. References
  5. QNAP

View the Project on GitHub sbs20/scanservjs

Reverse proxy

scanservjs supports reverse proxying and uses relative paths throughout so no URL rewriting should be required.

Apache

Example setup using a debian based distro.

sudo apt install apache2
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo nano /etc/apache2/sites-available/000-default.conf

Then add the following to a virtual host:

<Location /scanner/>
  ProxyPass "http://127.0.0.1:8080/"
  ProxyPassReverse "http://127.0.0.1:8080/"
</Location>

And restart

sudo systemctl restart apache2

nginx

sudo apt install nginx

Edit your settings (e.g. sudo nano /etc/nginx/sites-available/default)

And add the following inside your chosen server block

  # Increase timeouts since scan operations can take some time
  proxy_read_timeout 300;
  proxy_connect_timeout 300;
  proxy_send_timeout 300;

  location /scanner/ {
    proxy_set_header   X-Real-IP $remote_addr;
    proxy_pass         http://127.0.0.1:8080/;
  }

Restart

sudo systemctl restart nginx