I installed the white label version of InvoiceNinja last month and have been running it on a Centos7 install since then. I was having some slowness and decided to restart the system, after the restart I can no longer access the Invoice Ninja system. What really doesn’t make any sense is that nothing changes other than the restart.
Environment:
Centos 7
PHP
Nginx
MariaDB
Log’s during access try
==> /var/log/nginx/ininja.access.log <==
192.168.2.127 - - [05/Aug/2018:21:30:27 -0400] “GET /login HTTP/1.1” 403 25 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36”
==> /var/log/nginx/ininja.error.log <==
2018/08/05 21:30:27 [error] 11940#0: *2 FastCGI sent in stderr: “PHP message: PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Unable to open primary script: /var/www/ninja/public/index.php (Permission denied)” while reading response header from upstream, client: 192.168.2.127, server: 192.168.2.250, request: “GET /login HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php71-fpm-ninja.sock:”, host: “192.168.2.250”
2018/08/05 21:30:27 [error] 11940#0: *2 open() “/var/www/ninja/public/favicon.ico” failed (13: Permission denied), client: 192.168.2.127, server: 192.168.2.250, request: “GET /favicon.ico HTTP/1.1”, host: “192.168.2.250”, referrer: “https://192.168.2.250/login”
I would agree but that doesn’t explain the fact that it’s been running for a month without any issues. If I had permissions issues it shouldn’t have started in the first place.
Thanks for the information about the php child process I’ll look st that too.
Installation guide says to do the following except that only disables SE Linux for the current session, after a restart it returns to the configuration file setup.
Current Installation guide
Disable SELinux with the following command:
setenforce 0
You won’t need it for Invoice Ninja and this setup.
And finally, start php-fpm and nginx:
Please update Installation guide to show
Disable SELinux with the following command:
setenforce 0
Disable SELinux on startup with
sed -i ‘s/SELINUX=enforcing/SELINUX=permissive/g’ /etc/selinux/config
You won’t need it for Invoice Ninja and this setup.