Home 2018b Forums Support Clean 4.4.3 Self-Hosted Install URL configuration clarification

This topic contains 6 replies, has 3 voices, and was last updated by  topper 2 months, 2 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #14139

    topper
    Participant

    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://mysite.com/billing
    #2 the admin ( for my exclusive use ) is at https://mysite.com/admin/invoiceninja

    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://mysite.com/billing)

    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.

    #14140

    topper
    Participant

    apologies, my environment is:

    Centos7.5
    cPanel
    PHP7.0
    MySQL MariaDB 10.2

    if that is related

    #14144

    Hillel Coren
    Keymaster

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

    #14180

    topper
    Participant

    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

    #14183

    Hillel Coren
    Keymaster

    Sorry, no. Just this from http://docs.invoiceninja.com/en/latest/install.html

    > 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.

    #14186

    Titanfail
    Participant

    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 [email protected]
            DocumentRoot /var/www/ninja/public
    
            <Directory /var/www/ninja/public>
            AllowOverride All
            </directory>
    
            ErrorLog ${APACHE_LOG_DIR}/error.log
            CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>
    
    # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
    
    #14198

    topper
    Participant

    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: https://mysite.com/billing/

    if anyone loads https://mysite.com/billing/ 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?

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Posted in: