Invoice Ninja behind Apache reverse proxy

Invoice Ninja is an invoicing web application, based on the Laravel framework.
Configuring this behind an Apache 2.4 web server requires some special configuration.

These notes assume you have an already working Apache2 server configured for reverse proxy operation, and separate working web server for Invoice Ninja.

On the reverse proxy server:

/etc/apache2/sites-enabled/ninja:

<Location /invoices>
 ProxyPass http://192.168.1.200/invoices
 ProxyPassReverse http://192.168.1.200/invoices
 SetOutputFilter INFLATE;proxy-html;DEFLATE
 ProxyHTMLEnable On
 ProxyHTMLURLMap http://192.168.1.200/invoices
 ProxyHTMLExtended On
</Location>

On the Invoice Ninja server:

/var/www/ninja/.env:
...
APP_UTL=https://www.mydomain.net/invoices
TRUSTED_PROXIES='*'
...

*Note: When configuring the App on a smartphone, do not use a slash at the end of the server URL, otherwise you will get an error in the Laravel-error log:
***Symfony/… => Call to a member function each() on null {…}