.. meta::
   :description: Information about setting up a reverse proxy for
                 ThinLinc Web Access with a custom path.

.. _reverse_proxy_custom_path:

Custom path configuration
~~~~~~~~~~~~~~~~~~~~~~~~~

You may also want to serve the entire ThinLinc Web Access interface from
a specific sub-path, such as :file:`/subpath/`, instead of from the
server root :file:`/`. This requires prefixing all of your ThinLinc path
handlers. The master's path becomes :file:`/subpath/` and the agent
paths will also be nested under it, such as
:file:`/subpath/connect/agent1.internal.example.com/`.

.. code:: nginx

   location /subpath/ {
       proxy_pass https://tl.internal.example.com:300/;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection $http_connection;
   }

   location /subpath/connect/tl.internal.example.com/ {
       proxy_pass https://tl.internal.example.com:300/;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection $http_connection;
   }

   location /subpath/connect/agent1.internal.example.com/ {
       proxy_pass https://agent1.internal.example.com:300/;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection $http_connection;
   }
