"Not found" after installation on sub-directory, incorrect SSL config? #1478

Closed
opened 2026-02-05 01:01:20 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @Virion21 on GitHub (Dec 19, 2019).

Hello, i have followed the bookstack subdirectory setup instructions as described here: https://www.bookstackapp.com/docs/admin/subdirectory-setup/

It seems like no matter what i do though i get a 404 not found error trying to access the site.

I have it on var/www/bookstack, my bookstack.conf config is as follows:

<VirtualHost *:80>
    ServerName mysite.com
    RewriteEngine On
    RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
    Alias "/bookstack" "/var/www/bookstack/public"
</VirtualHost>

<VirtualHost *:443>
        ServerName mysite.com
        ServerAdmin admin@localhost
        DocumentRoot /var/www/bookstack/public/
        Alias "/bookstack" "/var/www/bookstack/public"

    SSLEngine on
    SSLCertificateFile      /etc/letsencrypt/live/mysite.com/fullchain.pem
    SSLCertificateKeyFile   /etc/letsencrypt/live/mysite.com/privkey.pem

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

My .env file's APP URL is set to "APP_URL=https://mysite.com/bookstack"

Any help would be appreciated...

Originally created by @Virion21 on GitHub (Dec 19, 2019). Hello, i have followed the bookstack subdirectory setup instructions as described here: https://www.bookstackapp.com/docs/admin/subdirectory-setup/ It seems like no matter what i do though i get a 404 not found error trying to access the site. I have it on var/www/bookstack, my bookstack.conf config is as follows: ``` <VirtualHost *:80> ServerName mysite.com RewriteEngine On RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L] Alias "/bookstack" "/var/www/bookstack/public" </VirtualHost> <VirtualHost *:443> ServerName mysite.com ServerAdmin admin@localhost DocumentRoot /var/www/bookstack/public/ Alias "/bookstack" "/var/www/bookstack/public" SSLEngine on SSLCertificateFile /etc/letsencrypt/live/mysite.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/mysite.com/privkey.pem <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> ``` My .env file's APP URL is set to "APP_URL=https://mysite.com/bookstack" Any help would be appreciated...
OVERLORD added the 🐕 Support label 2026-02-05 01:01:20 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Dec 20, 2019):

Hi @Virion21,
Is the 404 page a BookStack page (Do you see a blue header bar?) or a plain looking error page?

Do you get a 404 when you visit direct on https://mysite.com?

@ssddanbrown commented on GitHub (Dec 20, 2019): Hi @Virion21, Is the 404 page a BookStack page (Do you see a blue header bar?) or a plain looking error page? Do you get a 404 when you visit direct on `https://mysite.com`?
Author
Owner

@Virion21 commented on GitHub (Dec 20, 2019):

Hi @Virion21,
Is the 404 page a BookStack page (Do you see a blue header bar?) or a plain looking error page?

Do you get a 404 when you visit direct on https://mysite.com?

Hey dan, thanks for the input. I've been able to solve it by adding /public at the end of the APP_URL

@Virion21 commented on GitHub (Dec 20, 2019): > Hi @Virion21, > Is the 404 page a BookStack page (Do you see a blue header bar?) or a plain looking error page? > > Do you get a 404 when you visit direct on `https://mysite.com`? Hey dan, thanks for the input. I've been able to solve it by adding /public at the end of the APP_URL
Author
Owner

@ssddanbrown commented on GitHub (Dec 21, 2019):

Hey dan, thanks for the input. I've been able to solve it by adding /public at the end of the APP_URL

Ah, Good news! Will therefore close this.

@ssddanbrown commented on GitHub (Dec 21, 2019): > Hey dan, thanks for the input. I've been able to solve it by adding /public at the end of the APP_URL Ah, Good news! Will therefore close this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1478