Home Forums Support Blank dashboard After moving from https to http

This topic contains 5 replies, has 3 voices, and was last updated by  Hillel Coren 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20792

    yuljk
    Participant

    Hi guys – I recently moved my self-hosted install over from https to http as I have configured SSL offloading on HAproxy.

    I set REQUIRE_HTTPS=false in .env and also set the URL to http.

    When I navigate to Invoice Ninja my dashboard is no longer showing Total Revenue etc and the clients and invoices screens are blank.

    Checking the modified date of my laravel-error logs shows nothing recent.

    Any ideas why this might be happening? – I’ve cleared the browser cache and Invoice Ninja cache.

    Many thanks

    #20801

    yuljk
    Participant

    Seems someone else had a similar issue a while back which explains my setup in HAproxy https://github.com/invoiceninja/invoiceninja/issues/1386

    Has anything changed with respect to this issue since this was posted?

    Many thanks

    #20810

    yuljk
    Participant

    I’ve resolved this issue now. For anyone having similar issues with HAProxy using SSL termination with Invoice Ninja, I setup an SSL backend for Invoice Ninja and generated a self-signed certificate (10 year lifetime) for my 443 virtual host in Apache2.

    I also disabled certificate SSL checks on the backend to cut down on CPU overhead.

    Invoice Ninja now works with a reverse proxy using SSL termination to a SSL backend 🙂

    #20823

    Hillel Coren
    Keymaster

    Glad to hear it’s working, thanks for sharing the solution!

    #23807

    winkelement
    Participant

    I’m late to the party but faced the same problem.
    There is an easy solution without the need for a self-signed certificate.

    Assuming HAproxy runs on the same machine as invoiceninja:

    In haproxy.cfg:

    backend invoiceninja-backend
    	http-request add-header X-Forwarded-Proto https if { ssl_fc }
    	server invoiceninja 127.0.0.1:[port] check

    In .env:

    APP_URL=https://your.server.com
    REQUIRE_HTTPS=true
    TRUSTED_PROXIES=127.0.0.1
    #23808

    Hillel Coren
    Keymaster

    Thanks for sharing the solution!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Posted in: