BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.47k stars 1.94k forks source link

Cannot get bookstack to load - Manual install #5050

Closed Jeffrey-FB closed 5 months ago

Jeffrey-FB commented 5 months ago

Attempted Debugging

Searched GitHub Issues

Describe the Scenario

Really not sure where i have gone wrong here. I've tried to setup bookstack with a existing database in AWS. Database side of it looks all good.

I'm at the point where I'm trying to get a page. but i get nothing. I've tried repairing the permissions with not change.

Not sure what I'm missing happy to try anything? even is there is an easy way to put my database info into a fresh install script. i.e. [https://github.com/BookStackApp/devops/blob/main/scripts/installation-ubuntu-24.04.sh]

Exact BookStack Version

24.05.1

Log Content

Details

``` :/home/ubuntu# tail /var/log/nginx/bookstack.error.log #2 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Logger.php(644): Monolog\Logger->addRecord() #3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Log/Logger.php(184): Monolog\Logger->error() #4 /var/www/Boo...; PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/var/www/BookStack/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: file_put_contents(/var/www/BookStack/storage/framework/views/019b63655f0602243bf3829336bebd7f.php): Failed to open stream: Permission denied Context: {"exception":{}} in /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:137 Stack trace: #0 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(44): Monolog\Handler\StreamHandler->write() #1 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Logger.php(389): Monolog\Handler\AbstractProcessingHandler->handle() #2 /var/www/BookStack/vendor/monolog/monolog/src/Monolog/Logger.php(644): Monolog\Logger->addRecord() #3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Log/Logger.ph :/home/ubuntu# tail /var/www/BookStack/storage/logs/laravel.log [stacktrace] #0 /var/www/BookStack/vendor/symfony/console/Command/Command.php(321): Symfony\\Component\\Console\\Input\\Input->validate() #1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run() #2 /var/www/BookStack/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run() #3 /var/www/BookStack/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand() #4 /var/www/BookStack/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun() #5 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run() #6 /var/www/BookStack/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle() #7 {main} "} ```

Hosting Environment

PHP8.3, Ubuntu 24.02, nginx 1.26.1, MariaDB

ssddanbrown commented 5 months ago

By those nginx error logs, looks like filesystem permissions are off. See our guidance here on filesystem permissions: https://www.bookstackapp.com/docs/admin/filesystem-permissions/

Jeffrey-FB commented 5 months ago

Hey @ssddanbrown

the default user is ubuntu I've tried all those permissions a few times step by step the only change would have been. sudo chown -R ubuntu:nginx /var/www/bookstack I've just redone them. And then i restarted the server

What have i missed? drwxr-xr-x 16 ubuntu nginx 4096 Jun 4 16:34 BookStack /var/www/BookStack/storage/logs -rwxrwxr-x 1 ubuntu nginx 11699 Jun 4 16:12 laravel.log

ssddanbrown commented 5 months ago

@Jeffrey-FB PHP used with nginx on Ubuntu would typically be running as the www-data user, not nginx unless this is not a standard Ubuntu environment and/or you've made changes to how PHP/nginx is running.

Jeffrey-FB commented 5 months ago

Thanks Dan

I couldn't figure this one out as I was following multiple guides. As i'm trying to host the DB on a remote server.

I've rebuilt it just using your install script, now I'm just trying to point it to the remote DB. Might spin up a new ticket regarding that as i cannot seem to link it.