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).
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
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 ninja.mydomain.com
Open Softaculous find Invoice Ninja, open it and klick Install.
Under URL chose https://ninja.mydomain.com
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.