After setup HTTPS , GUI is broken #2366

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

Originally created by @coucou-petite-perruche on GitHub (Aug 26, 2021).

Hi everyone :)

I run BookStack on a Ubuntu 20.04 VM.
I use the script for Ubuntu 20.04 https://www.bookstackapp.com/docs/admin/installation/#ubuntu-2004 .

Everything work in HTTP.

For HTTPS, i use : certbot certbot certonly --webroot --agree-tos --email myadress@myadress.com -d mywiki.com --webroot-path /var/www/bookstack/public

I update the file /etc/apache2/sites-available/bookstack.conf :

<VirtualHost *:80>
ServerName my-wiki.com
Redirect permanent / https://www.my-wiki.com

<VirtualHost *:443>
ServerName my-wiki.com

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

SSLEngine on
SSLCertificateFile           /etc/letsencrypt/live/my-wiki.com/fullchain.pem
SSLCertificateKeyFile       /etc/letsencrypt/live/my-wiki.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 /error.log
    CustomLog /access.log combined

RewriteCond %{SERVER_NAME} =
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

2021-08-26_19h29_18

Icons are giant, CSS is broken.

How can i fix it ?

Originally created by @coucou-petite-perruche on GitHub (Aug 26, 2021). Hi everyone :) I run BookStack on a Ubuntu 20.04 VM. I use the script for Ubuntu 20.04 https://www.bookstackapp.com/docs/admin/installation/#ubuntu-2004 . Everything work in HTTP. For HTTPS, i use : **certbot certbot certonly --webroot --agree-tos --email myadress@myadress.com -d mywiki.com --webroot-path /var/www/bookstack/public** I update the file **/etc/apache2/sites-available/bookstack.conf** : <VirtualHost *:80> ServerName my-wiki.com Redirect permanent / https://www.my-wiki.com </VirtualHost> <VirtualHost *:443> ServerName my-wiki.com ServerAdmin webmaster@localhost DocumentRoot /var/www/bookstack/public/ SSLEngine on SSLCertificateFile /etc/letsencrypt/live/my-wiki.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/my-wiki.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 /error.log CustomLog /access.log combined RewriteCond %{SERVER_NAME} =<url> RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost> ![2021-08-26_19h29_18](https://user-images.githubusercontent.com/35967750/131008594-2d690d55-d456-41ab-a37a-183d1bd34596.png) Icons are giant, CSS is broken. How can i fix it ?
Author
Owner

@ssddanbrown commented on GitHub (Aug 26, 2021):

Hi @dimitrilctr,
Have you updated you APP_URL in the /var/www/bookstack/.env file to also start with https://?

@ssddanbrown commented on GitHub (Aug 26, 2021): Hi @dimitrilctr, Have you updated you `APP_URL` in the `/var/www/bookstack/.env` file to also start with `https://`?
Author
Owner

@coucou-petite-perruche commented on GitHub (Aug 27, 2021):

Hi @ssddanbrown .
It works, i miss this file.

Thanks for your fast answer :)

@coucou-petite-perruche commented on GitHub (Aug 27, 2021): Hi @ssddanbrown . It works, i miss this file. Thanks for your fast answer :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2366