Self Hosted - Can this be installed to VirtualMin?

I am having problems trying to install this to a virtual server within virtualmin, I am following all the steps in the documentation but I am getting a 403 Forbidden error if I visit ninja.example.com and if I visit ninja.example.com/ninja/public/ I get ninja.example.com is currently unable to handle this request.
HTTP ERROR 500

Any help will be much appreciated. Thank you

Are there any details about the error in the web server error logs?

[Sun Feb 23 10:10:41.266003 2020] [fcgid:warn] [pid 35616] [client 1.1.1.1:50655] mod_fcgid: stderr: PHP Fatal error: Uncaught ErrorException: file_put_contents(/home/localhost/domains/ninja.example.com/public_html/ninja/storage/framework/views/0014f90b75dfd863466986f61b88fe027fa1cd09.php): failed to open stream: Permission denied in /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122
[Sun Feb 23 10:10:41.266006 2020] [fcgid:warn] [pid 35616] [client 1.1.1.1:50655] mod_fcgid: stderr: Stack trace:
[Sun Feb 23 10:10:41.266008 2020] [fcgid:warn] [pid 35616] [client 1.1.1.1:50655] mod_fcgid: stderr: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, ‘file_put_conten…’, ‘/home/localhost/…’, 122, Array)
[Sun Feb 23 10:10:41.266011 2020] [fcgid:warn] [pid 35616] [client 1.1.1.1:50655] mod_fcgid: stderr: #1 /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents(’/home/localhost/…’, ‘<?php $__env->s…’, 0)
[Sun Feb 23 10:10:41.266014 2020] [fcgid:warn] [pid 35616] [client 1.1.1.1:50655] mod_fcgid: stderr: #2 /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(121): Illuminate\Filesystem\Filesystem->put(’/home/localhost/…’, ‘<?php $__env->s…’)
[Sun Feb 23 10:10:41.266017 2020] [fcgid:warn] [pid 35616] [client 1.1.1.1:50655] mod_fcgid: stderr: #3 /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framew in /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php on line 122
[Sun Feb 23 10:14:30.820919 2020] [ssl:warn] [pid 1638] AH01906: ninja.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Feb 23 10:15:55.335841 2020] [autoindex:error] [pid 51093] [client 195.154.61.206:45737] AH01276: Cannot serve directory /home/localhost/domains/ninja.example.com/public_html/: No matching DirectoryIndex (index.html,index.htm,index.php,index.php4,index.php5) found, and server-generated directory index forbidden by Options directive
[Sun Feb 23 10:17:20.343222 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: PHP Fatal error: Uncaught ErrorException: file_put_contents(/home/localhost/domains/ninja.example.com/public_html/ninja/storage/framework/views/0014f90b75dfd863466986f61b88fe027fa1cd09.php): failed to open stream: Permission denied in /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122
[Sun Feb 23 10:17:20.343270 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: Stack trace:
[Sun Feb 23 10:17:20.343273 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, ‘file_put_conten…’, ‘/home/localhost/…’, 122, Array)
[Sun Feb 23 10:17:20.343277 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: #1 /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents(’/home/localhost/…’, ‘<?php $__env->s…’, 0)
[Sun Feb 23 10:17:20.343280 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: #2 /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(121): Illuminate\Filesystem\Filesystem->put(’/home/localhost/…’, ‘<?php $__env->s…’)
[Sun Feb 23 10:17:20.343284 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: #3 /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framew in /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php on line 122
[Sun Feb 23 10:17:20.343287 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: PHP Fatal error: Uncaught ErrorException: file_put_contents(/home/localhost/domains/ninja.example.com/public_html/ninja/storage/framework/views/0014f90b75dfd863466986f61b88fe027fa1cd09.php): failed to open stream: Permission denied in /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122
[Sun Feb 23 10:17:20.343291 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: Stack trace:
[Sun Feb 23 10:17:20.343294 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, ‘file_put_conten…’, ‘/home/localhost/…’, 122, Array)
[Sun Feb 23 10:17:20.343297 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: #1 /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents(’/home/localhost/…’, ‘<?php $__env->s…’, 0)
[Sun Feb 23 10:17:20.343300 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: #2 /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(121): Illuminate\Filesystem\Filesystem->put(’/home/localhost/…’, ‘<?php $__env->s…’)
[Sun Feb 23 10:17:20.343304 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr: #3 /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framew in /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php on line 122`

Sorry, I’m not sure. The error logs also indicate a permissions issue.

What should I do for the permissions?

Have you seen this:

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

Permission issue:

Permission denied in /home/localhost/domains/ninja.example.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122 [Sun Feb 23 10:17:20.343270 2020] [fcgid:warn] [pid 51358] [client 1.1.1.1:50879] mod_fcgid: stderr:

Delete files from your server and reupload the files like you get them in the .zip, they already have the correct permissions so you don’t need to change anything

I did uploaded the files without changing the permissions at first but still was having the same problem then I saw in step 3 (in the docs) to change permission to 755

Hillel I did followed all the steps in the self host install docs