Home Forums Support Setting up self hosted – Ubuntu mate- with Apache2 – setup page not found

This topic contains 5 replies, has 3 voices, and was last updated by  Titanfail 1 week, 4 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #17231

    ThomasDC
    Participant

    Hi!

    I am using Invoice ninja for a while now..
    (I just started a very small business with only a few customers, so i was using the online hoste version, but i need to be able to generate reports so now I want to self host it)

    I have an Odroid C2 running ubunte mate

    I followed the steps here:

    Install InvoiceNinja on Ubuntu 16.04 / 18.04 with Apache2, MariaDB and PHP 7.2

    I first ran into this bug:
    Dwolla/omnipay-dwolla dependency not found #2507 (https://github.com/invoiceninja/invoiceninja/issues/2507)

    so I started completely over but instead of following:
    Step 5: Download InvoiceNinja Latest Release from the manual
    I downloaded the invoiceninja ZIP form https://download.invoiceninja.com and extracted it to:
    /var/www/html/invoiceninja/ninja-v4.5.6
    (so what i did was donload it on a windows pc, extract everything and then ftp copy it to ubuntu using filezilla)

    after this I used the commands:
    sudo chown -R www-data:www-data /var/www/html/invoiceninja/invoiceninja/ninja-v4.5.6
    sudo chmod -R 755 /var/www/html/invoiceninja/invoiceninja/ninja-v4.5.6

    I have also struggled to get the virtual host working
    (i tried to create a /etc/apache2/sites-available/test.dev.conf file with “ServerName test.dev” and “ServerAlias http://www.test.dev
    and “DocumentRoot /var/www/html/invoiceninja/ninja-v4.5.6/ninja/public/”
    but when, after a ‘systemctl reload apache2’ command, i browse to test.dev its not working and i don’t know what i am doing wrong here..)

    But anyway to solve this i changed the 000-default.conf document root to point towards /var/www/html/invoiceninja/ninja-v4.5.6/ninja/public/

    and now when i browse to ‘localhost’ it goes to ‘localhost/setup’ but with the error “Not Found”
    (i already read on the forum it may have something to do with permissions? but i did use these commands like explained earlier:)

    sudo chown -R www-data:www-data /var/www/html/invoiceninja/invoiceninja/ninja-v4.5.6
    sudo chmod -R 755 /var/www/html/invoiceninja/invoiceninja/ninja-v4.5.6

    Like you can probably tell I am not an expert in these kind of things.. but I like to learn. I really hope I can get InvoiceNinja sefl hosted working..

    So al help is welcome (but please keep in mind that i will need more then ‘you didnt give permison’ or ‘you didnt extract well’ I will need then also the explanation how to do it)

    Thanks a lot!

    #17232

    Hillel Coren
    Keymaster

    Hard to say… if you’re seeing ‘not found’ it could be a problem with the webs server config.

    Does adding /public to the URL help?

    Also, your permissions commands look incorrect, I’d suggest reviewing the docs.

    https://invoice-ninja.readthedocs.io/en/latest/install.html#step-2-upload-the-code-to-your-server

    #17233

    ThomasDC
    Participant

    Thanks for the reply!

    Does adding /public to the URL help?
    –> /public was already added, I din’t copy it right to start post (i edited it)

    your permissions commands look incorrect, I’d suggest reviewing the docs.
    I tried this:

    cd /var/www/html/invoiceninja/invoiceninja/ninja-v4.5.6
    chmod -R 755 storage
    sudo chown -R www-data:www-data storage bootstrap public/logo

    but i still got the same error after reloading the web page.

    so for now i deleted everything from invoiceninja, copied the ZIP file to the directory: /var/www/html/invoiceninja
    and unziped it. again used the commands:

    chmod -R 755 storage
    sudo chown -R www-data:www-data storage bootstrap public/logo

    But still with the same error

    after unzipping.. do i still need to use the command:
    sudo composer install ?? or is this not necessary?

    if you’re seeing ‘not found’ it could be a problem with the webs server config
    is there something i should check? I followed and configured like described here: https://websiteforstudents.com/install-invoiceninja-on-ubuntu-16-04-18-04-with-apache2-mariadb-and-php-7-2/

    if I change the path in my .conf file (DocumentRoot) to a path that doesn’t exist I also get the same ‘Not Found’ error but then the path (in url browser) is still ‘localhost’ instead of ‘localhost/setup’

    Thanks a lot!

    #17234

    Hillel Coren
    Keymaster

    If you use the self host zip you don’t need to run composer install.

    Not sure… maybe someone else has some ideas?

    #17235

    ThomasDC
    Participant

    Thanks for your help!

    I got it to work:

    The problem was in my apache .conf file

    like i said in my first post.. I don’t get the virtual host to work
    so i started looking at other tutorials how apache2 virtual host is working and followed some examples
    (but it din’t work neither, still dont get how I shoud use the virtual host witht the servername, when i try to go to the domain i get ‘this site can’t be reached) but in their examples the config file doesn’t include the

         <Directory /var/www/html/invoiceninja/public>
            Options +FollowSymlinks
            AllowOverride All
            Require all granted
         </Directory>

    so for testing i did delete this also and tested with a simple html file but nevertheless..
    anyway i was able to point localhost to my simple html file so i was able to load this page.. once this was working i changed the path to the invoiceninja path.. but i dint add the last part of code again..

    Thanks a lot for helping me out!
    I still will have to figure out how the whole virtual host and domains are working but i think i better look on apache forums to solve this 🙂 for now i can acces invoiceninja with ‘localhost’

    Great Thanks to Hillel Coren for helping me out!

    • This reply was modified 1 week, 5 days ago by  ThomasDC.
    • This reply was modified 1 week, 5 days ago by  ThomasDC.
    #17239

    Titanfail
    Participant

    One thing I would recommend against in general is using paths that are tied to a specific version number (you mentioned using /var/www/html/invoiceninja/invoiceninja/ninja-v4.5.6). While nothing will break if you do that, it will get confusing after a few updates when the path no longer matches what version you actually have installed. And you’ll get annoyed very quickly by changing the path with each update.

    Should you need to know at any given time, the currently installed version is at the bottom of every page, and is also in /storage/version.txt.

    Installing to /var/www/ninja or something equally simple is usually sufficient.

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

You must be logged in to reply to this topic.

Posted in: