Not Found error on /login URL #4764

Closed
opened 2026-02-05 09:13:49 +03:00 by OVERLORD · 9 comments
Owner

Originally created by @RickFr410 on GitHub (May 12, 2024).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Hello
When I go to the BookStack URL, I have a not Found error when redirects to /login page. I made many searches, no actions made solve the problem. I tried some php artisan commands to clear cache and regenerate permissions

php artisan config:clear
php artisan cache:clear (don't work : Failed to clear cache. Make sure you have the appropriate permissions. - an issue is already open for that)
php artisan view:clear
php artisan config:cache
php artisan bookstack:regenerate-comment-content (don't work : Command "bookstack:regenerate-comment-content" is not defined. Did you mean one of these?)
php artisan bookstack:regenerate-search
php artisan bookstack:regenerate-permissions
php artisan cache:clear
php artisan config:cache
php artisan view:cache

I tried too to replace none by All on the AllowOverride directive.

Exact BookStack Version

v24.05

Log Content

Details

laravel.log file :

[2024-05-12 16:58:11] production.ERROR: Command "bookstack:regenerate-comment-content" is not defined.

Did you mean one of these?
    bookstack:cleanup-images
    bookstack:clear-activity
    bookstack:clear-revisions
    bookstack:clear-views
    bookstack:copy-shelf-permissions
    bookstack:create-admin
    bookstack:db-utf8mb4
    bookstack:delete-users
    bookstack:refresh-avatar
    bookstack:regenerate-permissions
    bookstack:regenerate-references
    bookstack:regenerate-search
    bookstack:reset-mfa
    bookstack:update-url {"exception":"[object] (Symfony\\Component\\Console\\Exception\\CommandNotFoundException(code: 0): Command \"bookstack:regenerate-comment-content\" is not defined.

Did you mean one of these?
    bookstack:cleanup-images
    bookstack:clear-activity
    bookstack:clear-revisions
    bookstack:clear-views
    bookstack:copy-shelf-permissions
    bookstack:create-admin
    bookstack:db-utf8mb4
    bookstack:delete-users
    bookstack:refresh-avatar
    bookstack:regenerate-permissions
    bookstack:regenerate-references
    bookstack:regenerate-search
    bookstack:reset-mfa
    bookstack:update-url at /var/www/html/BookStack/vendor/symfony/console/Application.php:737)
[stacktrace]
#0 /var/www/html/BookStack/vendor/symfony/console/Application.php(266): Symfony\\Component\\Console\\Application->find()
#1 /var/www/html/BookStack/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun()
#2 /var/www/html/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
#3 /var/www/html/BookStack/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#4 {main}
"}

Apache access.log file :

192.168.0.131 - - [12/May/2024:19:53:26 +0200] "GET /login HTTP/1.1" 404 498 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0"
192.168.0.131 - - [12/May/2024:21:50:52 +0200] "GET /login HTTP/1.1" 404 498 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0"
192.168.0.131 - - [12/May/2024:21:50:53 +0200] "GET /login HTTP/1.1" 404 497 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0"
192.168.0.131 - - [12/May/2024:21:53:14 +0200] "GET / HTTP/1.1" 302 1926 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0"
192.168.0.131 - - [12/May/2024:21:53:14 +0200] "GET /login HTTP/1.1" 404 497 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0"
192.168.0.131 - - [12/May/2024:21:53:16 +0200] "GET /login HTTP/1.1" 404 497 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0"

Hosting Environment

PHP 8.2.18 - phpinfo.pdf

Debian 12.5
Apache/2.4.59
PHP 8.2.18

Originally created by @RickFr410 on GitHub (May 12, 2024). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Hello When I go to the BookStack URL, I have a not Found error when redirects to /login page. I made many searches, no actions made solve the problem. I tried some php artisan commands to clear cache and regenerate permissions ```bash php artisan config:clear php artisan cache:clear (don't work : Failed to clear cache. Make sure you have the appropriate permissions. - an issue is already open for that) php artisan view:clear php artisan config:cache php artisan bookstack:regenerate-comment-content (don't work : Command "bookstack:regenerate-comment-content" is not defined. Did you mean one of these?) php artisan bookstack:regenerate-search php artisan bookstack:regenerate-permissions php artisan cache:clear php artisan config:cache php artisan view:cache ``` I tried too to replace none by All on the AllowOverride directive. ### Exact BookStack Version v24.05 ### Log Content <details><summary>Details</summary> <p> laravel.log file : ``` [2024-05-12 16:58:11] production.ERROR: Command "bookstack:regenerate-comment-content" is not defined. Did you mean one of these? bookstack:cleanup-images bookstack:clear-activity bookstack:clear-revisions bookstack:clear-views bookstack:copy-shelf-permissions bookstack:create-admin bookstack:db-utf8mb4 bookstack:delete-users bookstack:refresh-avatar bookstack:regenerate-permissions bookstack:regenerate-references bookstack:regenerate-search bookstack:reset-mfa bookstack:update-url {"exception":"[object] (Symfony\\Component\\Console\\Exception\\CommandNotFoundException(code: 0): Command \"bookstack:regenerate-comment-content\" is not defined. Did you mean one of these? bookstack:cleanup-images bookstack:clear-activity bookstack:clear-revisions bookstack:clear-views bookstack:copy-shelf-permissions bookstack:create-admin bookstack:db-utf8mb4 bookstack:delete-users bookstack:refresh-avatar bookstack:regenerate-permissions bookstack:regenerate-references bookstack:regenerate-search bookstack:reset-mfa bookstack:update-url at /var/www/html/BookStack/vendor/symfony/console/Application.php:737) [stacktrace] #0 /var/www/html/BookStack/vendor/symfony/console/Application.php(266): Symfony\\Component\\Console\\Application->find() #1 /var/www/html/BookStack/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun() #2 /var/www/html/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run() #3 /var/www/html/BookStack/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle() #4 {main} "} ``` Apache access.log file : ``` 192.168.0.131 - - [12/May/2024:19:53:26 +0200] "GET /login HTTP/1.1" 404 498 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" 192.168.0.131 - - [12/May/2024:21:50:52 +0200] "GET /login HTTP/1.1" 404 498 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" 192.168.0.131 - - [12/May/2024:21:50:53 +0200] "GET /login HTTP/1.1" 404 497 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" 192.168.0.131 - - [12/May/2024:21:53:14 +0200] "GET / HTTP/1.1" 302 1926 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" 192.168.0.131 - - [12/May/2024:21:53:14 +0200] "GET /login HTTP/1.1" 404 497 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" 192.168.0.131 - - [12/May/2024:21:53:16 +0200] "GET /login HTTP/1.1" 404 497 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" ``` </p> </details> ### Hosting Environment [PHP 8.2.18 - phpinfo.pdf](https://github.com/BookStackApp/BookStack/files/15287491/PHP.8.2.18.-.phpinfo.pdf) Debian 12.5 Apache/2.4.59 PHP 8.2.18
OVERLORD added the 🐕 Support label 2026-02-05 09:13:49 +03:00
Author
Owner

@ssddanbrown commented on GitHub (May 13, 2024):

Hi @RickFr410,
Within your .env file, do you have an APP_URL set that exactly matches the base URL you're using for accessing BookStack in the browser?

I tried too to replace none by All on the AllowOverride directive.

It's probably best to revert that change if it's made no difference since it's better to configure at the web-server level, can add confusion and security considerations.

@ssddanbrown commented on GitHub (May 13, 2024): Hi @RickFr410, Within your `.env` file, do you have an `APP_URL` set that exactly matches the base URL you're using for accessing BookStack in the browser? > I tried too to replace none by All on the AllowOverride directive. It's probably best to revert that change if it's made no difference since it's better to configure at the web-server level, can add confusion and security considerations.
Author
Owner

@RickFr410 commented on GitHub (May 13, 2024):

Within your .env file, do you have an APP_URL set that exactly matches the base URL you're using for accessing BookStack in the browser?

Yes, I checked the URL in this variable, it's okay.

It's probably best to revert that change if it's made no difference since it's better to configure at the web-server level, can add confusion and security considerations.

It's a test VM, no security risk. I prefer to wait a solution as the public folder contain a .htaccess file. I think the Options directive is concerned by the AllowOverride directive.

@RickFr410 commented on GitHub (May 13, 2024): > Within your `.env` file, do you have an `APP_URL` set that exactly matches the base URL you're using for accessing BookStack in the browser? Yes, I checked the URL in this variable, it's okay. > It's probably best to revert that change if it's made no difference since it's better to configure at the web-server level, can add confusion and security considerations. It's a test VM, no security risk. I prefer to wait a solution as the public folder contain a .htaccess file. I think the Options directive is concerned by the AllowOverride directive.
Author
Owner

@ssddanbrown commented on GitHub (May 14, 2024):

What about Apache mod_rewrite, is that enabled?

sudo a2enmod rewrite
sudo systemctl restart apache2.service
@ssddanbrown commented on GitHub (May 14, 2024): What about Apache mod_rewrite, is that enabled? ```bash sudo a2enmod rewrite sudo systemctl restart apache2.service ```
Author
Owner

@RickFr410 commented on GitHub (May 14, 2024):

What about Apache mod_rewrite, is that enabled?

sudo a2enmod rewrite
sudo systemctl restart apache2.service

Yes, the mod_rewrite is enabled. I put the phpinfo() result in my first post, below the Apache loaded modules from it :

core mod_so mod_watchdog http_core mod_log_config mod_logio mod_version mod_unixd mod_access_compat
mod_alias mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_host mod_authz_user
mod_autoindex mod_deflate mod_dir mod_env mod_filter mod_mime prefork mod_negotiation mod_php
mod_proxy mod_reqtimeout mod_rewrite mod_setenvif mod_status

@RickFr410 commented on GitHub (May 14, 2024): > What about Apache mod_rewrite, is that enabled? > > ```shell > sudo a2enmod rewrite > sudo systemctl restart apache2.service > ``` Yes, the mod_rewrite is enabled. I put the phpinfo() result in my first post, below the Apache loaded modules from it : > core mod_so mod_watchdog http_core mod_log_config mod_logio mod_version mod_unixd mod_access_compat > mod_alias mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_host mod_authz_user > mod_autoindex mod_deflate mod_dir mod_env mod_filter mod_mime prefork mod_negotiation mod_php > mod_proxy mod_reqtimeout mod_rewrite mod_setenvif mod_status
Author
Owner

@ssddanbrown commented on GitHub (May 14, 2024):

@RickFr410 Okay, can you share the full apache virtualhost config used?

@ssddanbrown commented on GitHub (May 14, 2024): @RickFr410 Okay, can you share the full apache virtualhost config used?
Author
Owner

@RickFr410 commented on GitHub (May 14, 2024):

@ssddanbrown I used the proposed one on the doc (except the AllowOverride I modified). I put it here in few minutes.

@RickFr410 commented on GitHub (May 14, 2024): @ssddanbrown I used the proposed one on the doc (except the AllowOverride I modified). I put it here in few minutes.
Author
Owner

@RickFr410 commented on GitHub (May 14, 2024):

@ssddanbrown

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/BookStack/public
        ServerName www.bookstack.local
        ServerAlias bookstack.local

        <Directory /var/www/html/bookstack/public/>
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
                <IfModule mod_rewrite.c>
                        <IfModule mod_negotiation.c>
                                Options -MultiViews -Indexes
                        </IfModule>

                        RewriteEngine On

                        # Handle Authorization Header
                        RewriteCond %{HTTP:Authorization} .
                        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

                        # Redirect Trailing Slashes If Not A Folder...
                        RewriteCond %{REQUEST_FILENAME} !-d
                        RewriteCond %{REQUEST_URI} (.+)/$
                        RewriteRule ^ %1 [L,R=301]

                        # Handle Front Controller...
                        RewriteCond %{REQUEST_FILENAME} !-d
                        RewriteCond %{REQUEST_FILENAME} !-f
                        RewriteRule ^ index.php [L]
                </IfModule>
        </Directory>

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

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

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>
@RickFr410 commented on GitHub (May 14, 2024): @ssddanbrown ```apache <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html/BookStack/public ServerName www.bookstack.local ServerAlias bookstack.local <Directory /var/www/html/bookstack/public/> Options Indexes FollowSymLinks AllowOverride All Require all granted <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews -Indexes </IfModule> RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule> </Directory> # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf </VirtualHost> ```
Author
Owner

@ssddanbrown commented on GitHub (May 14, 2024):

@RickFr410 In the <Directory definition of the apache config shared above, Update the path to be fully matching and correct (Within /var/www/html/bookstack/public/ update bookstack to BookStack to match the actual path used).
Then restart apache and confirm if that changes anything.

@ssddanbrown commented on GitHub (May 14, 2024): @RickFr410 In the `<Directory` definition of the apache config shared above, Update the path to be fully matching and correct (Within `/var/www/html/bookstack/public/` update `bookstack` to `BookStack` to match the actual path used). Then restart apache and confirm if that changes anything.
Author
Owner

@RickFr410 commented on GitHub (May 14, 2024):

@ssddanbrown Yes, it's Okay. Thanks.

@RickFr410 commented on GitHub (May 14, 2024): @ssddanbrown Yes, it's Okay. Thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4764