Links all directing to private IP

I have a strange issue that is driving me mad. I’m using the bitnami VMware image on my esx server behind a hardware firewall and dns hosted on cloudflare. NAT rules are setup and I can get to my install both internally and externally via domain or IP. However, the problem is once I login to the page billing.example.com all menu items and links stop using the domain name and show the private internal RFC IP, like 192.168.0.10

I have multiple web servers, pbx systems etc all using this configuration and only the bitnami invoiceninja is doing this. I’ve checked /etc/hosts /etc/hostname httpd.conf and ran the bnconfig tool to update hostname. The server is showing correct hostname, is pingable and accessible via the outside but once you login the application (Invoice Ninja) points to the internal IP!

Any advice, ideas, anything would help, I’m probably missing something stupid.

Thank You

-BTW Incredible software, trying to drop freshbooks for #invoiceninja

Here’s some info from the following Stack Overflow question:

http://stackoverflow.com/questions/25750604/laravel-artisan-gives-wrong-base-url

  • Laravel uses the $_SERVER variable to determine the URL, it may be useful to check its value to narrow down the problem.
  • You may be able to fix this by checking that APP_URL is correct in the .env file in the root folder and then adding the following line of code to the top of app/Http/routes.php

URL::forceRootUrl( Config::get(‘app.url’) );

Thank you, editing the APP_URL in .env does fix the issue, however on reboot the setting reverts back to the private IP. Is this file generated somewhere?

No, it’s a static file.