Page Not Found (subfolder installation) #4241

Closed
opened 2026-02-05 08:19:31 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @gmaccario on GitHub (Sep 26, 2023).

Describe the Bug

I know this was already discussed, and I already tried different things. But still, after a fresh manual installation, this is the message error: "Page Not Found Sorry, The page you were looking for could not be found."

Env:
Apache/2.4.38 (Debian)
PHP 8.1.20
mysql Ver 8.1.0 for Linux on x86_64 (MySQL Community Server - GPL)

APP_URL=http://localhost:85/bookstackapp

.htaccess in root folder:

Options +FollowSymLinks
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ public/$1
</IfModule>

.htacess in public folder:

 <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>

When I open a browser on http://localhost:85/bookstackapp this is the result:
image

Thanks in advance for the help.

Steps to Reproduce

  1. Go to http://localhost:85/bookstackapp/

Expected Behaviour

Open a web page

Screenshots or Additional Context

image

Browser Details

Google Chrome Version 116.0.5845.188 (Official Build) (64-bit)

Exact BookStack Version

v23.08.3

Originally created by @gmaccario on GitHub (Sep 26, 2023). ### Describe the Bug I know this was already discussed, and I already tried different things. But still, after a fresh manual installation, this is the message error: "Page Not Found Sorry, The page you were looking for could not be found." **Env:** Apache/2.4.38 (Debian) PHP 8.1.20 mysql Ver 8.1.0 for Linux on x86_64 (MySQL Community Server - GPL) APP_URL=http://localhost:85/bookstackapp .htaccess in root folder: ```apache Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/$1 </IfModule> ``` .htacess in public folder: ```apache <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> ``` When I open a browser on http://localhost:85/bookstackapp this is the result: ![image](https://github.com/BookStackApp/BookStack/assets/5927739/0bc7e738-4e16-472b-869e-32db7ee5c342) Thanks in advance for the help. ### Steps to Reproduce 1. Go to http://localhost:85/bookstackapp/ ### Expected Behaviour Open a web page ### Screenshots or Additional Context ![image](https://github.com/BookStackApp/BookStack/assets/5927739/170a2180-6917-4343-af0d-e3b014906990) ### Browser Details Google Chrome Version 116.0.5845.188 (Official Build) (64-bit) ### Exact BookStack Version v23.08.3
OVERLORD added the 🐛 Bug label 2026-02-05 08:19:31 +03:00
Author
Owner

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

Hi @gmaccario, BookStack does not support being installed within a subdirectory of another website.
You should update your webserver config so that the bookstack public/ folder is the web root directory.

If it helps, I show the process of installing on a Debian & Apache system in my video here:
https://youtu.be/UpwfeFmzxLk?t=808
With apache configuration from about the 14:00 timestamp.

@ssddanbrown commented on GitHub (Sep 26, 2023): Hi @gmaccario, BookStack does not support being installed within a subdirectory of another website. You should update your webserver config so that the bookstack `public/` folder is the web root directory. If it helps, I show the process of installing on a Debian & Apache system in my video here: https://youtu.be/UpwfeFmzxLk?t=808 With apache configuration from about the 14:00 timestamp.
Author
Owner

@gmaccario commented on GitHub (Sep 27, 2023):

Thank you @ssddanbrown

I eventually installed it in the root folder. It works. I am going to close this (not) issue.

@gmaccario commented on GitHub (Sep 27, 2023): Thank you @ssddanbrown I eventually installed it in the root folder. It works. I am going to close this (not) issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4241