Bookstack breaks when adding SSL #1992

Closed
opened 2026-02-05 02:24:50 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @luizaq on GitHub (Dec 22, 2020).

Description:
Whenever adding ssl or tls bookstack would show either the giant icons (which there are old issues #996 and #879)
Installation was made using apache and the default script on ubuntu 18.4 and 20.4 .
Giant Icons-
When this happened it the failed to load app.js in the public/dist folder.
error continued after re-downloading all files in this folder.
Blank page:
When the blank page was present , it was an error 500. The http requests weren't being routed to https.
Steps and verifications.
The url was set correctly in the .env file.
Apache settings:

`<VirtualHost *:80>
    ServerName mydomain.dev

    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 /error.log
    CustomLog /access.log combined

</VirtualHost>`
whenever using just http it worked perfectly. But everytime after adding TLS it would present either the blank page or the giant icons.

Used certibot and lets encrypt .
Originally created by @luizaq on GitHub (Dec 22, 2020). Description: Whenever adding ssl or tls bookstack would show either the giant icons (which there are old issues #996 and #879) Installation was made using apache and the default script on ubuntu 18.4 and 20.4 . Giant Icons- When this happened it the failed to load app.js in the public/dist folder. error continued after re-downloading all files in this folder. Blank page: When the blank page was present , it was an error 500. The http requests weren't being routed to https. Steps and verifications. The url was set correctly in the .env file. Apache settings: ``` `<VirtualHost *:80> ServerName mydomain.dev 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 /error.log CustomLog /access.log combined </VirtualHost>` whenever using just http it worked perfectly. But everytime after adding TLS it would present either the blank page or the giant icons. Used certibot and lets encrypt .
Author
Owner

@ssddanbrown commented on GitHub (Dec 23, 2020):

Hi @luizaq,

  • Giant icons are generally a sign of the APP_URL option in the .env file not being set. Double check this and that it starts with https if changing to https. If definitely correct, check for a /var/www/bookstack/bootstrap/cache/config.php file and delete it if existing.
  • Blank white pages are very commonly a sign of permission issues. Double check permissions are set on the required locations. Commonly sudo chown -R www-data:www-data storage/ public/uploads bootstrap/cache, ran in /var/www/bookstack.

Installation was made using apache and the default script on ubuntu 18.4 and 20.4 .

You've ran both scripts or have installed on one system then re-installed on another?

@ssddanbrown commented on GitHub (Dec 23, 2020): Hi @luizaq, - Giant icons are generally a sign of the `APP_URL` option in the `.env` file not being set. Double check this and that it starts with https if changing to https. If definitely correct, check for a `/var/www/bookstack/bootstrap/cache/config.php` file and delete it if existing. - Blank white pages are very commonly a sign of permission issues. Double check permissions are set on the required locations. Commonly `sudo chown -R www-data:www-data storage/ public/uploads bootstrap/cache`, ran in `/var/www/bookstack`. > Installation was made using apache and the default script on ubuntu 18.4 and 20.4 . You've ran both scripts or have installed on one system then re-installed on another?
Author
Owner

@luizaq commented on GitHub (Dec 23, 2020):

2 separate installs, same error
will try those steps , thank you for the reply @ssddanbrown

@luizaq commented on GitHub (Dec 23, 2020): 2 separate installs, same error will try those steps , thank you for the reply @ssddanbrown
Author
Owner

@vmarlier commented on GitHub (Dec 23, 2020):

Hello,

Same here, http 500 when TLS is set.
.env file is correctly set and permissions are okay on the mentioned folders/files.

I am running bookstack with a docker image (solidnerd) in kubernetes.
Working well with http but not with https.

@vmarlier commented on GitHub (Dec 23, 2020): Hello, Same here, http 500 when TLS is set. .env file is correctly set and permissions are okay on the mentioned folders/files. I am running bookstack with a docker image (solidnerd) in kubernetes. Working well with http but not with https.
Author
Owner

@luizaq commented on GitHub (Dec 28, 2020):

I got it working!
My best theory as to why it finally worked is that installed the script with the ip address as a server name and moved it to my domain after.

Heres more details in case it might help anyone.

In ubuntu 20 used the Appropriated script .no update.
i set Bookstack server name to the server ip adress , because i was over it.
Decided to try to move it to my domain.(i own a .dev domain so SSL is required)

All of these steps i took were based on this tutorial: https://nickolas.gupton.xyz/2020/05/21/ubuntu-20.04-bookstack.html
1-Generated the certificate
2-Changed the info on the .conf file and then the .env

Overall the same steps i took quite a few times before, but this time it worked, as if it was mocking me.

Few notes about probably irrelevant steps:
I used VIM instead of nano.
I didnt run apt upgrade . So the configuration is the stock ubuntu 20. Digital Ocean droplet

@luizaq commented on GitHub (Dec 28, 2020): I got it working! My best theory as to why it finally worked is that installed the script with the **ip address as a server name** and moved it to my domain after. Heres more details in case it might help anyone. > In ubuntu 20 used the Appropriated script .no update. > i set Bookstack server name to the server ip adress , because i was over it. > Decided to try to move it to my domain.(i own a .dev domain so SSL is required) All of these steps i took were based on this tutorial: https://nickolas.gupton.xyz/2020/05/21/ubuntu-20.04-bookstack.html 1-Generated the certificate 2-Changed the info on the .conf file and then the .env Overall the same steps i took quite a few times before, but this time it worked, as if it was mocking me. **Few notes about probably irrelevant steps:** I used VIM instead of nano. I didnt run apt upgrade . So the configuration is the stock ubuntu 20. Digital Ocean droplet
Author
Owner

@ssddanbrown commented on GitHub (Dec 30, 2020):

Good news @luizaq! Glad to hear you got things working. I'll therefore close this off.

@ssddanbrown commented on GitHub (Dec 30, 2020): Good news @luizaq! Glad to hear you got things working. I'll therefore close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1992