Invoiceninja apache subfolder install

I’m testing/trying to install from github repos the invoiceninja app.

I’m running ubuntu/apache

the test is close. but i can’t figure out what/how to setup/install to get http://1.2.3.4/ninja/setup

this appears to redirect back to the default – login page/form.

willing to pay to understand what i’m missing.

thanks!!

i’ve followed the install steps
running on digitalocean --ubuntu

Hi,

The issue may be caused by using a subfolder, I suggest trying without it.

You also may want to try recreating the database, I believe if the tables exist you’ll see the login screen rather then setup.

Hi,

Thanks for the suggestion on the refresh. Been researching, haven’t found a process or steps for this.

Are you suggesting doing a base delete of the db and then a recreate of the “blank” db?

Can you elaborate in the steps you have in mind.

thanks

Yes, that is correct.

  1. delete the database
  2. create the database
  3. give user permissions to the new database

would i then use
php artisan migrate to repopulate?

or just invoke the site url, and it should get me the setup page?

I believe you should see the setup page

hey…

thanks. dropping/redoing the db got the setup page as well as login page… success…

i put together a short overview/steps i used… take a look. if you think its useful place it were it will help…

if you have questions, let me know
setting up invoiceninja
-self hosting
digitalocean
ubuntu
apache
mysql
php8.2

for setting up app in a subfolder
/var/www/html/ninja

/etc/apache2/sites-available
foo.conf – has the invoiceninja vhost

/etc/apache2/mods-available
alias.conf

create/enable the conf files

foo.conf
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName temp22
ServerAlias temp
DocumentRoot /var/www/html/ninja/public
#DocumentRoot /var/www/html/

<Directory    /var/www/html/ninja/public>

        DirectoryIndex index.html index.php

        # test Options -Indexes +FollowSymLinks +MultiViews 
        #Options -Indexes +FollowSymLinks +MultiViews
        Options +FollowSymLinks
        AllowOverride All 
        Require all granted 
        ##Options -Indexes +FollowSymLinks +MultiViews AllowOverride All Require all granted


        ##Options Indexes FollowSymLinks MultiViews
        ##Options -Indexes FollowSymlinks
        #Options FollowSymlinks
        #AllowOverride All
        ##Order allow,deny
        ##allow from all
        #Require all granted
</Directory>




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

alias.conf
Alias /ninja/ “/var/www/html/ninja/public/”

enable the conf files
a2dismod alias
a2enmod alias
a2dismod rewrite
a2enmod rewrite

download the “invoiceninja” files into your dir
-the example conf files above use the
/var/www/html/ninja as example

chmod -R 777 /var/www/html/ninja
chown -R www-data:www-data /var/www/html/ninja

handle perms for “storage” dir as required…

follow the required php artisan cmds as required
-might need to run as “sudo -u www-data” artisan install…

as to the required database, you can set it up/install prior
to installing the invoiceninja app
-use the same dbname/user/passwd for the app setup…
-do not populate the db/tbls prior to running the initial
“setup” http://1.2.3.4/ninja/setup process…

in an example db setup…
CREATE DATABASE IF NOT EXISTS ninja;
CREATE USER ‘ninja_user’@‘localhost’ IDENTIFIED BY ‘ninjapass’;
CREATE USER ‘ninja_user’@‘%’ IDENTIFIED BY ‘ninjapass’;
GRANT ALL PRIVILEGES ON ninja.* TO ‘ninja_user’@‘localhost’;
GRANT ALL PRIVILEGES ON ninja.* TO ‘ninja_user’@‘%’;
flush privileges;

at this point…
conf files setup
app installed in the dir
db setup

the .htaccess —public/.htaccess setup

you’re in the “subfolder”…

compare this with the other nginx/install steps to make sure you’re not
missing anything…

get the browser, point the url
http://1.2.3.4/ninja
if you see blank page…
-try this in the mysql, for the db.
-signin as db_user
-use ninja;
-update accounts set set_react_as_default_ap=0;

at this point… should have login form…

but… you need to populate/setup the “ninja” app…

do this – to setup…

http://1.2.3.4/ninja/setup <<<<<<<<<<<<<<<<<<<<<<<

this should get you to the setup page, where you can then setup the app…

if you have issues…
try to “reset/drop” the data base…

mysql -uroot -p (or user for nginx)
passwd

use nginx
drop databse nginx (or drop nginx)
“update accounts set set_react_as_default_ap=0;”
exit

redo the http://1.2.3.4/ninja/setup

1 Like