500 Error after installation on CentOS 7 wint NGINX #1460

Closed
opened 2026-02-05 00:58:33 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @MylesBR on GitHub (Nov 23, 2019).

Describe the bug
After installation on CentOS 7, MariaDB and NGINX. I am getting a http 500 error
bookstack_errorlog shows me

HP message: PHP Fatal error:  Uncaught ErrorException: file_put_contents(/var/www/BookStack/storage/framework/views/4b8e70439d73c1f6b6ab796f9756cda764dd98e9.ph
p): failed to open stream: Permission denied in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_conten...', '/var/www/BookSt...', 122, Array)
#1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/var/www/BookSt...', '<?php $__env->s...', 0)
#2 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(121): Illuminate\Filesystem\Filesystem->put('/var/www/BookSt...',
 '<?php $__env->s...')
#3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\View\Compilers\BladeCompiler->compile('/var/www/Bo
o

Steps To Reproduce
Steps to reproduce the behaviour:

  1. Open site in a browser (Chrome)
  2. See error
    This page isn’t working
    35.201.28.126 is currently unable to handle this request.
    HTTP ERROR 500

open /var/log/nginx/bookstack_errorlog

HP message: PHP Fatal error:  Uncaught ErrorException: file_put_contents(/var/www/BookStack/storage/framework/views/4b8e70439d73c1f6b6ab796f9756cda764dd98e9.ph
p): failed to open stream: Permission denied in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_conten...', '/var/www/BookSt...', 122, Array)
#1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/var/www/BookSt...', '<?php $__env->s...', 0)
#2 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(121): Illuminate\Filesystem\Filesystem->put('/var/www/BookSt...',
 '<?php $__env->s...')
#3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\View\Compilers\BladeCompiler->compile('/var/www/Bo
o

Checked ownership on \var\www\Bookstack = nginx:nginx
Checked write permission on:
\var\www\Bookstack\bootstrap\cache
\var\www\Bookstack\storage
\var\www\Bookstack\public\uploads

Expected behavior
Bookstack login page

Screenshots
Uploading 2019-11-23_23-05-10.png…
Uploading 2019-11-23_23-04-49.png…
Uploading 2019-11-23_23-04-30.png…

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): latest download
  • PHP Version: 7.2
  • Hosting Method (Nginx/Apache/Docker): NGINX on GKP

Additional context
n/a

Originally created by @MylesBR on GitHub (Nov 23, 2019). **Describe the bug** After installation on CentOS 7, MariaDB and NGINX. I am getting a http 500 error bookstack_errorlog shows me ``` HP message: PHP Fatal error: Uncaught ErrorException: file_put_contents(/var/www/BookStack/storage/framework/views/4b8e70439d73c1f6b6ab796f9756cda764dd98e9.ph p): failed to open stream: Permission denied in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_conten...', '/var/www/BookSt...', 122, Array) #1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/var/www/BookSt...', '<?php $__env->s...', 0) #2 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(121): Illuminate\Filesystem\Filesystem->put('/var/www/BookSt...', '<?php $__env->s...') #3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\View\Compilers\BladeCompiler->compile('/var/www/Bo o ``` **Steps To Reproduce** Steps to reproduce the behaviour: 1. Open site in a browser (Chrome) 2. See error This page isn’t working 35.201.28.126 is currently unable to handle this request. HTTP ERROR 500 open /var/log/nginx/bookstack_errorlog ``` HP message: PHP Fatal error: Uncaught ErrorException: file_put_contents(/var/www/BookStack/storage/framework/views/4b8e70439d73c1f6b6ab796f9756cda764dd98e9.ph p): failed to open stream: Permission denied in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_conten...', '/var/www/BookSt...', 122, Array) #1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/var/www/BookSt...', '<?php $__env->s...', 0) #2 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(121): Illuminate\Filesystem\Filesystem->put('/var/www/BookSt...', '<?php $__env->s...') #3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\View\Compilers\BladeCompiler->compile('/var/www/Bo o ``` Checked ownership on \var\www\Bookstack = nginx:nginx Checked write permission on: \var\www\Bookstack\bootstrap\cache \var\www\Bookstack\storage \var\www\Bookstack\public\uploads **Expected behavior** Bookstack login page **Screenshots** ![Uploading 2019-11-23_23-05-10.png…]() ![Uploading 2019-11-23_23-04-49.png…]() ![Uploading 2019-11-23_23-04-30.png…]() **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): latest download - PHP Version: 7.2 - Hosting Method (Nginx/Apache/Docker): NGINX on GKP **Additional context** n/a
Author
Owner

@MylesBR commented on GitHub (Nov 23, 2019):

Disabling SELinux fixed the issue

@MylesBR commented on GitHub (Nov 23, 2019): Disabling SELinux fixed the issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1460