A few issues with self hosting, could use a little advice.

To force https

I used

RewriteCond %{HTTPS} !=on 
RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]
Redirect /index.wml https://billing.litonfire.design/login

I had to use the redirect because after adding the first two lines in .htaccess it kept forcing me to /index.wml for some reason.

my whole htaccess looks like

RewriteCond %{HTTPS} !=on 
RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]
Redirect /index.wml https://billing.litonfire.design/login

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews

    RewriteEngine On

    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

    # http://stackoverflow.com/a/20865084/497368
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # In case of running InvoiceNinja in a Subdomain like invoiceninja.example.com,
    # you have to enable the following line:
    RewriteBase /

To get it working…

Is this wrong?

Also, ran into an issue when using (view on website) via the iframe setup.

My client clicked the approve button, and it gave back a “oops something when’t wrong” message after, then I went in and clicked it and it work.

Now an “Approve” button is stuck on that quote. It will not go away even though the system already auto generated an invoice.

Quick question: Is it possible to have the system send out an email with invoice when it auto generates a invoice from a quote?

I think it was because I changed the settings / system settings / application settings to URL https:// from http:// after changing it back to http:// everything is working fine, even though I am running both my website that the iframe is on and the subdomain that invoice ninja is on in SSL

There is not much documentation on this, should this link be https:// after setup to SSL or keep it as http:// or should it not have the http:// in this address at all for application url?

I am pointing my subdomain to the /public folder as recommended.

One other issue I have experienced is

Under “products” if I try to use the dropdown to delete a product instead of saying “delete” it says “texts.delete_product” and if I click it it sends me to address /products/bulk and says “whoops, looks like something went wrong”

Thanks for any help.

Another way to force HTTPS is to add REQUIRE_HTTPS=true to the .env file.

Are there any details in storage/logs/laravel-error.log for the error?

Ideally the link should be HTTPS.

The problem with products should be fixed in v2.8.2.

Ya, storage/logs/laravel-error.log is loaded with

[internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))

Going to try to use .env to force and change http:// in setting to https:// after.

I changed the .env file to what you said and it broke everything.

Now after switching black its still broken, did this effect my database?

This is bad lol

Nevermind: Im checking with my host. I think they may have changed IP for my pointers. Probably not related to this.

#79 /home/mysqldatabase/public_html/my.website.address/bootstrap/cache/compiled.php(3286): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

Alot of these errors too

Ok, so just to update, the .env changes had nothing to do with my load error.

It was my hosts fault :slight_smile:

Changed the setup for https

its working fine with the .env setup vs using the htaccess file.

Changes the setting in website address to https:// and that seems to be fine.

Still have a button that says “approve” on a quote that’s already been approved though, not sure why its stuck there. If you click it, leads to nowhere because its already approved and has auto generated an invoice. Guess ill just live with it and leave it as is. Would like to get rid of it though if there is a way to go in and edit that particular invoice and remove the button so there is no confusion on that one in the future.

Everything else seems to be fine.

Doing an update now to see if 2.8.2 fixes the delete issue with products.

If I delete a product, does it remove it from all of my quotes / invoices that have that product on it?

Thanks for the help.

EDIT: also can I delete the info in the error log and save it and replace empty to see if I have fixed the issues? basically i’m asking if the log effects anything when cleared.


I have fixed everything,

Cleared the logs, ran a full purchase from quote to auto invoice to checkout with stripe, worked great!

Loggs are empty this time.

Looks like the issue was this.

I had sent the quote out to the person when the website was http then after switching to https and changing the “site address” to https:// it caused an error when they clicked the approve button, probably because when the quote was generated it was set to http and was seeking the http address when the site was now setup for https and http is forced into https, then it worked one of the 10 times I clicked it, but never sent the update to the page for the quote to remove the approve.

How can I go in and remove this approve manually on this one quote?

Update to 2.8.2 fixed the other issue with product delete. Thank you.

Glad to hear you figured it out!

We don’t recommend manually changing the database (make a backup, etc…)

You would need to set the quote_invoice_id field in the invoices table for the quote record to the id of the generated invoice.

I would backup first,

Thanks much!

Love this thing, runs like clockwork, updates like a machine! Best invoice system out there.


Thanks, we’ve got some great new features we’re working on…