InvoiceNinja, Caddy and Nginx.

Is anyone running a self-hosted InvoiceNinja on Nginx, but reversed proxy through Caddy?.
Caddy handles all of my SSL certificates so I use it as the front-end to all of my web apps.

Here’s the relevant configuration on my caddyfile:


example.com:443 {
        gzip
        proxy / http://10.10.10.10:80 {
                transparent
        }
        fastcgi / 10.10.10.10:9000
}

With these parameters, I can reach the home page but the page looks broken. None of the images and css elements are present, just a user and password box, and even when I type the credentials and hit enter it doesn’t do anything.

Going directly to http://10.10.10.10 works fine, so I think the issue is with Caddy and not Nginx. Any help is appreciated.

Thanks!

Bit late, but I ran into this today myself. No content was loading onto InvoiceNinja other than the index file because it’s secure over https, and everything else is over http, only visible after bypassing a mixed http/https content warning. I didn’t try logging in, but as no scripts were being parsed I’m sure it wouldn’t have worked.

Including this in my .env file fixed it; (of course subbing in the IP InvoiceNinja’s nginx server will see Caddy traffic coming from):

TRUSTED_PROXIES='XXX.XXX.XXX.XXX'

…as it lets Invoice Ninja know there’s a reverse proxy.