Skip to content

nginx proxy configuration

maksis edited this page Apr 18, 2020 · 1 revision

See the nginx documentation for more information about setting up a proxy server.

  #	
  # AirDC++ Web Client
  #
  # You may change the location path but it must always start with "airdcpp".
  # This is because the UI uses URLs for routing so it must be able to determine
  # the base directory from the URL.
  #
  location /airdcpp/ {
          # Client URL (no need for HTTPS when using localhost)
          proxy_pass  http://localhost:5600/;

          # Gzipping javascript will reduce the transferred data significantly
          # This has no effect if gzip compression is disabled from nginx
          gzip_types      text/plain application/javascript;

          # Proxy websockets
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "upgrade";

          # Uncomment the line below if you are using nginx's basic auth module
          # Otherwise the nginx authentication header would be forwarded to the app, 
          # which would cause all HTTP requests to fail. Uncommenting the line also means 
          # that you can't access the API via nginx with basic authentication
          #
          # proxy_set_header Authorization "";
  }