v23.08.2 Application Homepage Setting Not Working #4207

Closed
opened 2026-02-05 08:14:13 +03:00 by OVERLORD · 18 comments
Owner

Originally created by @2devs1code on GitHub (Sep 13, 2023).

Describe the Bug

when I go to the base URL, I want the system to default to /books. This had worked for me prior to the upgrade to 23.08.2. Previous version is 23.06.2. Now I just get some default page showing popular pages, books, and chapters along with a very noticeable Page Not Found across the top of the page, above those other sections. There is a book that is published that allows unauthenticated users to see and read it. This does not show up.

After logging in as an admin and going to the base URL, I get the same behavior.

I have also set the default page to shelves and specific pages with no change in behavior.

Steps to Reproduce

Go to settings | customization. Set application homepage to books. Go to default url and note this is not the books you expected to see.

Expected Behaviour

I expect the base URL to display the contents of /books or anything else I choose after making the application homepage change.

Screenshots or Additional Context

Note the URLs for the base site vs /books
image

image

Browser Details

various forms of chromium and firefox

Exact BookStack Version

23.08.2

Originally created by @2devs1code on GitHub (Sep 13, 2023). ### Describe the Bug when I go to the base URL, I want the system to default to /books. This had worked for me prior to the upgrade to 23.08.2. Previous version is 23.06.2. Now I just get some default page showing popular pages, books, and chapters along with a very noticeable Page Not Found across the top of the page, above those other sections. There is a book that is published that allows unauthenticated users to see and read it. This does not show up. After logging in as an admin and going to the base URL, I get the same behavior. I have also set the default page to shelves and specific pages with no change in behavior. ### Steps to Reproduce Go to settings | customization. Set application homepage to books. Go to default url and note this is not the books you expected to see. ### Expected Behaviour I expect the base URL to display the contents of /books or anything else I choose after making the application homepage change. ### Screenshots or Additional Context Note the URLs for the base site vs /books ![image](https://github.com/BookStackApp/BookStack/assets/144492849/d90cd87e-c5d5-4b20-b484-f09a6b189da4) ![image](https://github.com/BookStackApp/BookStack/assets/144492849/38337208-c017-41b0-b794-6bb2accf991a) ### Browser Details various forms of chromium and firefox ### Exact BookStack Version 23.08.2
OVERLORD added the 🐛 Bug label 2026-02-05 08:14:13 +03:00
Author
Owner

@2devs1code commented on GitHub (Sep 13, 2023):

image

@2devs1code commented on GitHub (Sep 13, 2023): ![image](https://github.com/BookStackApp/BookStack/assets/144492849/4bd7c9fd-238a-4684-bb4f-c1c0b5010cfd)
Author
Owner

@ssddanbrown commented on GitHub (Sep 13, 2023):

Hi @2devs1code,
This is not something I've been able to reproduce.
Can you confirm:

  • The installation method and environment of your BookStack install.
  • If all update commands (If re-ran) complete without error.
  • The full output of running git status && git log -n 1 from your BookStack install.
  • The full output of running ls -alh bootstrap/cache from your BookStack install (Assuming a linux system).
@ssddanbrown commented on GitHub (Sep 13, 2023): Hi @2devs1code, This is not something I've been able to reproduce. Can you confirm: - The installation method and environment of your BookStack install. - If all update commands (If re-ran) complete without error. - The full output of running `git status && git log -n 1` from your BookStack install. - The full output of running `ls -alh bootstrap/cache` from your BookStack install (Assuming a linux system).
Author
Owner

@2devs1code commented on GitHub (Sep 13, 2023):

From the responsible party:

  1. fresh install then reattached previous v26 db
  2. update commands all ran clean
/var/www/bookstack# php artisan migrate


                                                                                                     APPLICATION IN PRODUCTION.


  Do you really wish to run this command? (yes/no) [no]
❯ yes

   INFO  Running migrations.

  2023_06_10_071823_remove_guest_user_secondary_roles ..................................................................................... 6ms DONE
  2023_06_25_181952_remove_bookshelf_create_entity_permissions ............................................................................ 0ms DONE
  2023_07_25_124945_add_receive_notifications_role_permissions ............................................................................ 9ms DONE
  2023_07_31_104430_create_watches_table ................................................................................................. 86ms DONE
  2023_08_21_174248_increase_cache_size .................................................................................................. 74ms DONE

/var/www/bookstack# php artisan cache:clear
php artisan config:clear
php artisan view:clear

   INFO  Application cache cleared successfully.


   INFO  Configuration cache cleared successfully.


   INFO  Compiled views cleared successfully.

/var/www/bookstack# systemctl restart apache2

/var/www/bookstack# git status && git log -n 1
On branch release
Your branch is up to date with 'origin/release'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	.env.bak
	public/apiref.html
	public/sitemap.xml

nothing added to commit but untracked files present (use "git add" to track)
commit 3f473528b13f59680ee5c8dc600abfd444920f92 (HEAD -> release, tag: v23.08.2, origin/release)
Author: Dan Brown <ssddanbrown@googlemail.com>
Date:   Mon Sep 4 12:06:50 2023 +0100

    Updated version and assets for release v23.08.2
root@ip-10-0-0-31:/var/www/bookstack# ls -alh bootstrap/cache
total 36K
drwxrwxr-x 2 root www-data 4.0K Sep 13 17:20 .
drwxr-xr-x 3 root www-data 4.0K Sep 13 17:20 ..
-rwxrwxr-x 1 root www-data   14 Sep 13 17:20 .gitignore
-rwxrwxr-x 1 root www-data 1.6K Sep 13 17:20 packages.php
-rwxrwxr-x 1 root www-data  20K Sep 13 17:20 services.php
/var/www/bookstack# git status && git log -n 1
On branch release
Your branch is up to date with 'origin/release'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	.env.bak
	public/apiref.html
	public/sitemap.xml

nothing added to commit but untracked files present (use "git add" to track)
commit 3f473528b13f59680ee5c8dc600abfd444920f92 (HEAD -> release, tag: v23.08.2, origin/release)
Author: Dan Brown <ssddanbrown@googlemail.com>
Date:   Mon Sep 4 12:06:50 2023 +0100

    Updated version and assets for release v23.08.2
[2:28](https://analoginfo.slack.com/archives/D04E928LCR4/p1694633293821389)
/var/www/bookstack# ls -alh bootstrap/cache
total 36K
drwxrwxr-x 2 root www-data 4.0K Sep 13 17:20 .
drwxr-xr-x 3 root www-data 4.0K Sep 13 17:20 ..
-rwxrwxr-x 1 root www-data   14 Sep 13 17:20 .gitignore
-rwxrwxr-x 1 root www-data 1.6K Sep 13 17:20 packages.php
-rwxrwxr-x 1 root www-data  20K Sep 13 17:20 services.php
@2devs1code commented on GitHub (Sep 13, 2023): From the responsible party: 1. fresh install then reattached previous v26 db 2. update commands all ran clean ``` /var/www/bookstack# php artisan migrate APPLICATION IN PRODUCTION. Do you really wish to run this command? (yes/no) [no] ❯ yes INFO Running migrations. 2023_06_10_071823_remove_guest_user_secondary_roles ..................................................................................... 6ms DONE 2023_06_25_181952_remove_bookshelf_create_entity_permissions ............................................................................ 0ms DONE 2023_07_25_124945_add_receive_notifications_role_permissions ............................................................................ 9ms DONE 2023_07_31_104430_create_watches_table ................................................................................................. 86ms DONE 2023_08_21_174248_increase_cache_size .................................................................................................. 74ms DONE /var/www/bookstack# php artisan cache:clear php artisan config:clear php artisan view:clear INFO Application cache cleared successfully. INFO Configuration cache cleared successfully. INFO Compiled views cleared successfully. /var/www/bookstack# systemctl restart apache2 /var/www/bookstack# git status && git log -n 1 On branch release Your branch is up to date with 'origin/release'. Untracked files: (use "git add <file>..." to include in what will be committed) .env.bak public/apiref.html public/sitemap.xml nothing added to commit but untracked files present (use "git add" to track) commit 3f473528b13f59680ee5c8dc600abfd444920f92 (HEAD -> release, tag: v23.08.2, origin/release) Author: Dan Brown <ssddanbrown@googlemail.com> Date: Mon Sep 4 12:06:50 2023 +0100 Updated version and assets for release v23.08.2 root@ip-10-0-0-31:/var/www/bookstack# ls -alh bootstrap/cache total 36K drwxrwxr-x 2 root www-data 4.0K Sep 13 17:20 . drwxr-xr-x 3 root www-data 4.0K Sep 13 17:20 .. -rwxrwxr-x 1 root www-data 14 Sep 13 17:20 .gitignore -rwxrwxr-x 1 root www-data 1.6K Sep 13 17:20 packages.php -rwxrwxr-x 1 root www-data 20K Sep 13 17:20 services.php ``` 3. ``` /var/www/bookstack# git status && git log -n 1 On branch release Your branch is up to date with 'origin/release'. Untracked files: (use "git add <file>..." to include in what will be committed) .env.bak public/apiref.html public/sitemap.xml nothing added to commit but untracked files present (use "git add" to track) commit 3f473528b13f59680ee5c8dc600abfd444920f92 (HEAD -> release, tag: v23.08.2, origin/release) Author: Dan Brown <ssddanbrown@googlemail.com> Date: Mon Sep 4 12:06:50 2023 +0100 Updated version and assets for release v23.08.2 [2:28](https://analoginfo.slack.com/archives/D04E928LCR4/p1694633293821389) ``` 4. ``` /var/www/bookstack# ls -alh bootstrap/cache total 36K drwxrwxr-x 2 root www-data 4.0K Sep 13 17:20 . drwxr-xr-x 3 root www-data 4.0K Sep 13 17:20 .. -rwxrwxr-x 1 root www-data 14 Sep 13 17:20 .gitignore -rwxrwxr-x 1 root www-data 1.6K Sep 13 17:20 packages.php -rwxrwxr-x 1 root www-data 20K Sep 13 17:20 services.php ```
Author
Owner

@ssddanbrown commented on GitHub (Sep 13, 2023):

@2devs1code For the update commands output, was that the output of the first run or a re-run? Also, since it's not shown, does the composer install --no-dev step complete without error?

@ssddanbrown commented on GitHub (Sep 13, 2023): @2devs1code For the update commands output, was that the output of the first run or a re-run? Also, since it's not shown, does the `composer install --no-dev` step complete without error?
Author
Owner

@2devs1code commented on GitHub (Sep 13, 2023):

re-run

:~/bookstack$ composer install --no-dev

@php -r "!file_exists('bootstrap/cache/services.php') || @unlink('bootstrap/cache/services.php');"
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package socialiteproviders/slack is abandoned, you should avoid using it. Use laravel/socialite instead.
Generating optimized autoload files
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi

INFO Discovering packages.

barryvdh/laravel-dompdf ..................................................................................................................... DONE
barryvdh/laravel-snappy ..................................................................................................................... DONE
intervention/image .......................................................................................................................... DONE
laravel/socialite ........................................................................................................................... DONE
laravel/tinker .............................................................................................................................. DONE
nesbot/carbon ............................................................................................................................... DONE
nunomaduro/termwind ......................................................................................................................... DONE
socialiteproviders/manager .................................................................................................................. DONE

62 packages you are using are looking for funding.
Use the composer fund command to find out more!

@php artisan cache:clear

INFO Application cache cleared successfully.

@php artisan view:clear

INFO Compiled views cleared successfully.

:~/bookstack$ php artisan migrate

                                                                                                 APPLICATION IN PRODUCTION.

Do you really wish to run this command? (yes/no) [no]
❯ yes

INFO Nothing to migrate.

:~/bookstack$ php artisan cache:clear
php artisan config:clear
php artisan view:clear

INFO Application cache cleared successfully.

INFO Configuration cache cleared successfully.

INFO Compiled views cleared successfully.

:~/bookstack$ git status && git log -n 1
On branch release
Your branch is up to date with 'origin/release'.

Untracked files:
(use "git add ..." to include in what will be committed)
.env.bak
public/apiref.html
public/sitemap.xml

nothing added to commit but untracked files present (use "git add" to track)
commit 3f473528b1 (HEAD -> release, tag: v23.08.2, origin/release)
Author: Dan Brown ssddanbrown@googlemail.com
Date: Mon Sep 4 12:06:50 2023 +0100

Updated version and assets for release v23.08.2

:~/bookstack$ ls -alh bootstrap/cache
total 36K
drwxrwxr-x 2 www-data www-data 4.0K Sep 13 19:53 .
drwxr-xr-x 3 www-data www-data 4.0K Sep 13 17:20 ..
-rwxrwxr-x 1 www-data www-data 14 Sep 13 17:20 .gitignore
-rwxrwxr-x 1 www-data www-data 1.6K Sep 13 19:53 packages.php
-rwxrwxr-x 1 www-data www-data 20K Sep 13 19:53 services.php

@2devs1code commented on GitHub (Sep 13, 2023): re-run :~/bookstack$ composer install --no-dev > @php -r "!file_exists('bootstrap/cache/services.php') || @unlink('bootstrap/cache/services.php');" Installing dependencies from lock file Verifying lock file contents can be installed on current platform. Nothing to install, update or remove Package socialiteproviders/slack is abandoned, you should avoid using it. Use laravel/socialite instead. Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi INFO Discovering packages. barryvdh/laravel-dompdf ..................................................................................................................... DONE barryvdh/laravel-snappy ..................................................................................................................... DONE intervention/image .......................................................................................................................... DONE laravel/socialite ........................................................................................................................... DONE laravel/tinker .............................................................................................................................. DONE nesbot/carbon ............................................................................................................................... DONE nunomaduro/termwind ......................................................................................................................... DONE socialiteproviders/manager .................................................................................................................. DONE 62 packages you are using are looking for funding. Use the `composer fund` command to find out more! > @php artisan cache:clear INFO Application cache cleared successfully. > @php artisan view:clear INFO Compiled views cleared successfully. :~/bookstack$ php artisan migrate APPLICATION IN PRODUCTION. Do you really wish to run this command? (yes/no) [no] ❯ yes INFO Nothing to migrate. :~/bookstack$ php artisan cache:clear php artisan config:clear php artisan view:clear INFO Application cache cleared successfully. INFO Configuration cache cleared successfully. INFO Compiled views cleared successfully. :~/bookstack$ git status && git log -n 1 On branch release Your branch is up to date with 'origin/release'. Untracked files: (use "git add <file>..." to include in what will be committed) .env.bak public/apiref.html public/sitemap.xml nothing added to commit but untracked files present (use "git add" to track) commit 3f473528b13f59680ee5c8dc600abfd444920f92 (HEAD -> release, tag: v23.08.2, origin/release) Author: Dan Brown <ssddanbrown@googlemail.com> Date: Mon Sep 4 12:06:50 2023 +0100 Updated version and assets for release v23.08.2 :~/bookstack$ ls -alh bootstrap/cache total 36K drwxrwxr-x 2 www-data www-data 4.0K Sep 13 19:53 . drwxr-xr-x 3 www-data www-data 4.0K Sep 13 17:20 .. -rwxrwxr-x 1 www-data www-data 14 Sep 13 17:20 .gitignore -rwxrwxr-x 1 www-data www-data 1.6K Sep 13 19:53 packages.php -rwxrwxr-x 1 www-data www-data 20K Sep 13 19:53 services.php
Author
Owner

@ssddanbrown commented on GitHub (Sep 14, 2023):

Okay, and the homepage is still not working? Just asking since, if the original details were a re-run, they indicate the database migrations were not originally performed upon upgrade before.

  • If still not working, are any other views/pages broken right now?
  • Does the homepage work if you log in?
  • Do you have any customizations active (visual/logical theme system)?
@ssddanbrown commented on GitHub (Sep 14, 2023): Okay, and the homepage is still not working? Just asking since, if the original details were a re-run, they indicate the database migrations were not originally performed upon upgrade before. - If still not working, are any other views/pages broken right now? - Does the homepage work if you log in? - Do you have any customizations active (visual/logical theme system)?
Author
Owner

@2devs1code commented on GitHub (Sep 14, 2023):

home page is still not working. It makes no difference if I login or not. We have the same custom headers that were present in v26. Nothing changed.

We added footer links, configured application home page and have these custom head content items:

<style> #recent-activity {display:none;} #recent-books {display:none;} #recent-pages {display:none;} #recently-updated-pages {display:none;} #recents {display:none;} #popular {display:none;} #new {display:none;} #sidebar {display:none;} #export-menu {display:none;} a[data-shortcut="revisions"] {display:none;} .tri-layout-right-contents a[href$="/delete"] + hr, .tri-layout-right-contents .actions hr + .dropdown-container {display: none;} footer a {display:block} </style>
@2devs1code commented on GitHub (Sep 14, 2023): home page is still not working. It makes no difference if I login or not. We have the same custom headers that were present in v26. Nothing changed. We added footer links, configured application home page and have these custom head content items: <style> #recent-activity {display:none;} #recent-books {display:none;} #recent-pages {display:none;} #recently-updated-pages {display:none;} #recents {display:none;} #popular {display:none;} #new {display:none;} #sidebar {display:none;} #export-menu {display:none;} a[data-shortcut="revisions"] {display:none;} .tri-layout-right-contents a[href$="/delete"] + hr, .tri-layout-right-contents .actions hr + .dropdown-container {display: none;} footer a {display:block} </style>
Author
Owner

@ssddanbrown commented on GitHub (Sep 14, 2023):

Okay. When you originally mentioned:

I have also set the default page to shelves and specific pages with no change in behavior.

Are you saying the other options also show the "Page not found" view? or do these work as expected?

Also:

  • Does the default homepage option work without issue?
  • Does adding CACHE_DRIVER=database fix the issue?
@ssddanbrown commented on GitHub (Sep 14, 2023): Okay. When you originally mentioned: > I have also set the default page to shelves and specific pages with no change in behavior. Are you saying the other options also show the "Page not found" view? or do these work as expected? Also: - Does the default homepage option work without issue? - Does adding `CACHE_DRIVER=database` fix the issue?
Author
Owner

@2devs1code commented on GitHub (Sep 14, 2023):

None of the home page settings work as expected. They all go to the same bad page. No dice on the cache.

@2devs1code commented on GitHub (Sep 14, 2023): None of the home page settings work as expected. They all go to the same bad page. No dice on the cache.
Author
Owner

@ssddanbrown commented on GitHub (Sep 14, 2023):

Okay, really unsure what's going on here.
Let's see if we can call the homepage manually and get more detail on the issue.
Can you run the below from your BookStack install directory then share the output?:

php artisan tinker --execute='$controller = app()->make(\BookStack\App\HomeController::class);try {app()->call([$controller, "index"]);dd("working");} catch (Throwable $e) {dd($e);}'
@ssddanbrown commented on GitHub (Sep 14, 2023): Okay, really unsure what's going on here. Let's see if we can call the homepage manually and get more detail on the issue. Can you run the below from your BookStack install directory then share the output?: ```bash php artisan tinker --execute='$controller = app()->make(\BookStack\App\HomeController::class);try {app()->call([$controller, "index"]);dd("working");} catch (Throwable $e) {dd($e);}' ```
Author
Owner

@robertjustjones commented on GitHub (Sep 14, 2023):

@ssddanbrown thanks for your help. I'm working here with @2devs1code on this issue.

I tried your first two suggestions. Setting the homepage to Default or any of the other settings had no effect. I also tried adding CACHE_DRIVER=database and separately with SESSION_DRIVER=database, with restarts after each change, also with no effect.

I tried the tinker line after each of the above .env changes. In all cases, I got the following error.

www-data@ip-10-0-0-31:~/bookstack$ php artisan tinker --execute='$controller = app()->make(\BookStack\App\HomeController::class);try {app()->call([$controller, "index"]);dd("working");} catch (Throwable $e) {dd($e);}'

In ConfigPaths.php line 393:

  Writing to directory /var/www/.config/psysh is not allowed.

Having search for any issues related to that message, I created the .config directory and the tinker line now yields

www-data@ip-10-0-0-31:~/bookstack$ php artisan tinker --execute='$controller = app()->make(\BookStack\App\HomeController::class);try {app()->call([$controller, "index"]);dd("working");} catch (Throwable $e) {dd($e);}'
"working" // vendor/psy/psysh/src/ExecutionClosure.php(40) : eval()'d code:4

Even so, no change to the homepage error. Does "code:4" or anything else tell you something.

@robertjustjones commented on GitHub (Sep 14, 2023): @ssddanbrown thanks for your help. I'm working here with @2devs1code on this issue. I tried your first two suggestions. Setting the homepage to Default or any of the other settings had no effect. I also tried adding `CACHE_DRIVER=database` and separately with `SESSION_DRIVER=database`, with restarts after each change, also with no effect. I tried the tinker line after each of the above .env changes. In all cases, I got the following error. ``` www-data@ip-10-0-0-31:~/bookstack$ php artisan tinker --execute='$controller = app()->make(\BookStack\App\HomeController::class);try {app()->call([$controller, "index"]);dd("working");} catch (Throwable $e) {dd($e);}' In ConfigPaths.php line 393: Writing to directory /var/www/.config/psysh is not allowed. ``` Having search for any issues related to that message, I created the .config directory and the tinker line now yields ``` www-data@ip-10-0-0-31:~/bookstack$ php artisan tinker --execute='$controller = app()->make(\BookStack\App\HomeController::class);try {app()->call([$controller, "index"]);dd("working");} catch (Throwable $e) {dd($e);}' "working" // vendor/psy/psysh/src/ExecutionClosure.php(40) : eval()'d code:4 ``` Even so, no change to the homepage error. Does "code:4" or anything else tell you something.
Author
Owner

@ssddanbrown commented on GitHub (Sep 14, 2023):

Even so, no change to the homepage error. Does "code:4" or anything else tell you something.

Not really to be honest. The test indicates that most of the controller logic is working.
I'm starting to wonder if this is a routing issue.

Can you temporarily edit the app/App/HomeController.php file, within your BookStack install, adding:

return "hello";

Above this line:

dfaf6f7c13/app/App/HomeController.php (L25)

Then load the homepage again. It should now just show "hello" on the homepage. If this is not the case, please could you share your apache config?

@ssddanbrown commented on GitHub (Sep 14, 2023): > Even so, no change to the homepage error. Does "code:4" or anything else tell you something. Not really to be honest. The test indicates that most of the controller logic is working. I'm starting to wonder if this is a routing issue. Can you temporarily edit the `app/App/HomeController.php` file, within your BookStack install, adding: ```php return "hello"; ``` Above this line: https://github.com/BookStackApp/BookStack/blob/dfaf6f7c13e5cee904a43f9e8ad3777ca512fac0/app/App/HomeController.php#L25 Then load the homepage again. It should now just show "hello" on the homepage. If this is not the case, please could you share your apache config?
Author
Owner

@robertjustjones commented on GitHub (Sep 14, 2023):

Having done that, I get "hello" if I go to /index.php but not for /. That's still the not found page.

I had a Cloudfront config that was sending errors to index.html, which I changed to index.php. FWIW, I've got caching disabled on everything but /uploads/ which is redirecting from s3.

Here's the conf, I think unedited from installation.

<VirtualHost *:80>
  ServerName docs.analoginfo.com

  ServerAdmin webmaster@localhost
  DocumentRoot /var/www/bookstack/public/

  <Directory /var/www/bookstack/public/>
      Options -Indexes +FollowSymLinks
      AllowOverride None
      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>

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

</VirtualHost>

In the access.log, I'm still seeing some requests for / get issued as /index.html (404) thus the error page. Since you mentioned it, I've done 2 things to try to correct that. First was adding this line to the above:

          RewriteRule ^ %1 [L,R=301]

          RewriteRule "^/index.html" "/index.php" [L]

          # Handle Front Controller...

And the second was to do effectively the same thing w a cloudfront function.

Still the error page.

@robertjustjones commented on GitHub (Sep 14, 2023): Having done that, I get "hello" if I go to `/index.php` but not for `/`. That's still the not found page. I had a Cloudfront config that was sending errors to `index.html`, which I changed to `index.php`. FWIW, I've got caching disabled on everything but `/uploads/` which is redirecting from s3. Here's the conf, I think unedited from installation. ``` <VirtualHost *:80> ServerName docs.analoginfo.com ServerAdmin webmaster@localhost DocumentRoot /var/www/bookstack/public/ <Directory /var/www/bookstack/public/> Options -Indexes +FollowSymLinks AllowOverride None 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> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> ``` In the access.log, I'm still seeing some requests for `/` get issued as `/index.html` (404) thus the error page. Since you mentioned it, I've done 2 things to try to correct that. First was adding this line to the above: ``` RewriteRule ^ %1 [L,R=301] RewriteRule "^/index.html" "/index.php" [L] # Handle Front Controller... ``` And the second was to do effectively the same thing w a cloudfront function. Still the error page.
Author
Owner

@robertjustjones commented on GitHub (Sep 14, 2023):

Doh, I found it. More in a moment.

@robertjustjones commented on GitHub (Sep 14, 2023): Doh, I found it. More in a moment.
Author
Owner

@robertjustjones commented on GitHub (Sep 14, 2023):

The cloudfront top-level distribution config was defaulted to index.html. Just changed it to index.php and reset all the tweaks from above. Works great... thank you so much!

@robertjustjones commented on GitHub (Sep 14, 2023): The cloudfront top-level distribution config was defaulted to index.html. Just changed it to index.php and reset all the tweaks from above. Works great... thank you so much!
Author
Owner

@robertjustjones commented on GitHub (Sep 14, 2023):

@2devs1code go ahead and close this one. Thanks!

@robertjustjones commented on GitHub (Sep 14, 2023): @2devs1code go ahead and close this one. Thanks!
Author
Owner

@2devs1code commented on GitHub (Sep 14, 2023):

thank you @ssddanbrown

@2devs1code commented on GitHub (Sep 14, 2023): thank you @ssddanbrown
Author
Owner

@ssddanbrown commented on GitHub (Sep 14, 2023):

Thanks for confirming back the cause, and glad to hear that you found the source of the issue!

@ssddanbrown commented on GitHub (Sep 14, 2023): Thanks for confirming back the cause, and glad to hear that you found the source of the issue!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4207