Self-Hosted Setup (Softaculous)

I recently installed InvoiceNinja on my server through the Softaculous installation method. I referred myself to the Installation Guide for safe measure, but I have a few questions mostly because I’m new to self-hosting altogether and I’m not sure what changes I need to make to my files.

First and foremost, I’m installing InvoiceNinja on a subdomain. In addition, that pesky /public part on the end of the URL is not something I want.

Now in the install guide, it mentions “To remove public/ from the URL map the webroot to the /public folder, alternatively you can uncomment RewriteRule ^(.*)$ public/$1 [L] in the .htaccess file.” Can someone explain this in a way that I can understand from a beginner’s standpoint? That /public url is really annoying.

Also in the Troubleshooting section of the install guide it says, " If you’re using a subdomain. ie, invoice.mycompany.com You will need to add RewriteBase / to public/.htaccess otherwise it may fail with Request exceeded the limit of 10 internal redirects due to probable configuration error. messages in the logs." I would also like further guidance on this so that I can make the necessary changes and not screw anything up.

If it makes any difference, my host is Bluehost.

Thanks in advance!

I don’t think you can set the webroot with Softaculous (you may want to email them to check), if that’s the case updating the .htaccess file is your only option to try. Note: you’ll need to reapply this change when updating the app.

If you aren’t seeing the error then you don’t need to make the change.

Thank you for the prompt response! Deleting that line of the .htaccess file didn’t seem to do anything at all. Interestingly, it appears that it also set a permanent 301 redirect and I’m not sure how that even happens. I try deactivating the redirect in my Bluehost account and it just gets overwritten – it doesn’t let me get rid of that. This is all pretty strange. Is there a workaround for these issues so that I can make the necessary changes? I have no problem starting over from scratch.

Did you delete the line or uncomment it?

Honestly I don’t know the difference – I just deleted that line. I just did a fresh install of InvoiceNinja so all files are back to default.

Could you tell me the correct process? I’m so sorry; this is my first custom install of anything. Editing code is completely new to me.

** Also at this point, I’m not getting any errors whatsoever. There was a PHP issue, but I got that resolved through my Bluehost panel – downgraded to 7.3 instead of 7.4 and the login screen loads now.

To test this change you’ll want to uncomment the line by removing the # at the beginning of it. Since the line is commented out deleting it will have no impact.

I did the above but that didn’t do anything at all. It kept redirecting to the darn /public url…HOWEVER, I kept reading the rest of the file and at the very bottom I see this code:

<IfModule mod_alias.c>
RedirectMatch 301 ^/$ https://clients.domain.com/public
</IfModule>

So I “commented” it by doing the following:

#<IfModule mod_alias.c>
#RedirectMatch 301 ^/$ https://clients.domain.com/public
#</IfModule>

You can now see https://clients.domain.com and that public url segment is now gone! :smiley:

1 Like

Awesome, glad to hear it!

I wonder if that’s added automatically by Softaculous, we’ll follow up with them to see if we can improve this in the next version.

1 Like

That you so much for your help on this! I hope this is useful for anyone else having the same frustrations. Aside from the issues with this, I’m glad to be a part of the InvoiceNinja Family! :slight_smile: :smiling_face_with_three_hearts:

1 Like