Clean 4.4.3 Self-Hosted Install URL configuration clarification

Dear All;

I have just found Invoice Ninja as a simpler solution to my current solution WHMCS. It looks promising!

My question is how to install/setup so that:

#1 the clients only ever see Https://
#2 the admin ( for my exclusive use ) is at

I have it running perfectly but on these URLS:
Clients see - ninja/public/view/chncgmwk176htip0spq5tkpdd8xqnn
and ninja/public/client/dashboard

I would need it cleaned up to the #1 reference above (Https://

Is this possible?
I would want to completely hide the location of my ‘admin’ folder

Additionally I intend to purchase the white lable option as to eliminate the “Invoice Ninja” confusion to clients when they load these pages.

Many thanks for the time here and please pardon me if this and the step by step solution has already been documented on your site.

apologies, my environment is:

MySQL MariaDB 10.2

if that is related

I’m not sure if that’s possible. You can remove /public by mapping your webroot to the folder.

Is there a step by step explanation on how to “remove /public by mapping your webroot to the folder” ?

I see mentions of htaccess and mod rewrite but there is no exact example I can see of what exactly to do.

thank you

Sorry, no. Just this from

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.

If you’re using Apache, the DocumentRoot variable should be set to /your/ninja/path/public/. You’ll need to change that in whatever .conf file is used by your setup. By default it’s usually 000-default.conf, but could be anything, really. If you’re using HTTPS in your setup, it will likely be something like default-ssl.conf.

You’ll want to look in /etc/apache2/sites-enabled, as that will have symlinks to the active .conf files for your setup. The files themselves are actually located in /etc/apache2/sites-available.

Easiest thing to do is sudo a2dissite <name_of_conf_file> (i.e. sudo a2dissite 000-default.conf, as it will know the correct path already), edit the requisite file in /etc/apache2/sites-available/, then sudo a2ensite <name_of_conf_file>, followed by restarting Apache with sudo service apache2 restart.

If you’re using nginx, the conf files are a bit more complicated, but the process is very similar. Unfortunately I long since nuked the system I was testing with nginx, since Apache was much easier for me to deal with.

For example purposes, here’s what my copy of /etc/apache2/sites-enabled/000-default.conf looks like (since I don’t use SSL because it’s a local-only system for me).

<VirtualHost *:80>

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/ninja/public

        <Directory /var/www/ninja/public>
        AllowOverride All

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined


# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Thank you to all who have replied!

I use cPanel - so editing Apache directly is not necessary.

I am doing my best to be specific as to not have a long thread here:

ACTION: un-commenting RewriteRule ^(.*)$ public/$1 [L] in the .htaccess file alone did not work.

How to remove the /public/ in the URL? ( I use cPanel, so which files do I need to change and how exactly, secondly do I need to change the URL here: /public/settings/system_settings

my goal: to install this script here:

if anyone loads they should only ever see a login page

side note: most software usually does things opposite to Ninja Software, for example they have the root folder of the public files then /admin. but why does Ninja do it the opposite way?

I recently discovered Invoice Ninja and think it is a really great product.
Initially I also suffered a URL issue regardless if I installed using Softaculous on cPanel or manually by ftp.
I couldn’t seem to find a written instruction and after some tinkering i found the following worked fine for me and figured here is a good place to document it.

In cPanel create a Subdomain like
Open Softaculous find Invoice Ninja, open it and klick Install.
Under URL chose
Klick install.
Load the new subdomain in your browser and you should be all set.

And don’t be greedy, pay the developers the white label license of just $30 a year or karma will bite you in the wallet…

On a second note Google Chrome seemed to play some tricks with me when I was editing the settings. I ended up uninstalling Chrome with Revo uninstaller and it found almost 2Gb cache left by the native uninstaller, reinstall Chrome and all is bliss.

|cPanel Version|92.0 (build 11)|
|Apache Version|2.4.46|
|PHP Version|7.2.33|
|MySQL Version|10.3.27-MariaDB-cll-lve|

1 Like