CSS Files Not Loading BookStack Apache #2049

Closed
opened 2026-02-05 02:43:31 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @jgraham14 on GitHub (Jan 19, 2021).

Describe the bug
Hi! I just installed BookStack on my Apache server, but the css files on the login page are not loading - I'm getting 404 errors for them.

404

apache2.conf setup:

<Directory /var/www/bookstack/BookStack/public>
        Options Indexes FollowSymLinks
        AllowOverride none
        Require all granted

        RewriteEngine On

        # 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]
</Directory>

mod_rewrite is enabled.

And my virtualhost setup in my sites-available:

<VirtualHost *:80>
        ServerAdmin *****@********.***
        ServerName myhostname
        ServerAlias www.myhostname
        DocumentRoot /var/www/bookstack/BookStack/public
        ErrorLog ${APACHE_LOG_DIR}/wiki_error.log
</VirtualHost>

Any thoughts on why I'm running into this issue?

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.32-dev
  • PHP Version: 7.2.24
  • Hosting Method (Nginx/Apache/Docker): Apache2 version 2.4.29 (Ubuntu)
Originally created by @jgraham14 on GitHub (Jan 19, 2021). **Describe the bug** Hi! I just installed BookStack on my Apache server, but the css files on the login page are not loading - I'm getting 404 errors for them. ![404](https://user-images.githubusercontent.com/52177792/104986947-71b37780-59e2-11eb-8369-2404c44e176a.PNG) apache2.conf setup: ``` <Directory /var/www/bookstack/BookStack/public> Options Indexes FollowSymLinks AllowOverride none Require all granted RewriteEngine On # 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] </Directory> ``` mod_rewrite is enabled. And my virtualhost setup in my sites-available: ``` <VirtualHost *:80> ServerAdmin *****@********.*** ServerName myhostname ServerAlias www.myhostname DocumentRoot /var/www/bookstack/BookStack/public ErrorLog ${APACHE_LOG_DIR}/wiki_error.log </VirtualHost> ``` Any thoughts on why I'm running into this issue? **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.32-dev - PHP Version: 7.2.24 - Hosting Method (Nginx/Apache/Docker): Apache2 version 2.4.29 (Ubuntu)
Author
Owner

@ssddanbrown commented on GitHub (Jan 20, 2021):

Hi @j-graham98 ,

I think you may be using the wrong branch of code. It looks like you're using the master branch code which does not include pre-built styles. You need to use release branch code. If you were following the manual installation instructions you may have missed of the --branch flag when cloning via git.

@ssddanbrown commented on GitHub (Jan 20, 2021): Hi @j-graham98 , I think you may be using the wrong branch of code. It looks like you're using the `master` branch code which does not include pre-built styles. You need to use release branch code. If you were following the manual installation instructions you may have missed of the `--branch` flag when cloning via git.
Author
Owner

@jgraham14 commented on GitHub (Jan 21, 2021):

That very well could be it - thank you! I'll try reinstalling with the correct branch and hope that fixes the issue.

@jgraham14 commented on GitHub (Jan 21, 2021): That very well could be it - thank you! I'll try reinstalling with the correct branch and hope that fixes the issue.
Author
Owner

@jgraham14 commented on GitHub (Jan 21, 2021):

That was it - thanks for your help!

@jgraham14 commented on GitHub (Jan 21, 2021): That was it - thanks for your help!
Author
Owner

@ssddanbrown commented on GitHub (Jan 22, 2021):

@j-graham98 Great to hear that solve it! Will therefore close this off.

@ssddanbrown commented on GitHub (Jan 22, 2021): @j-graham98 Great to hear that solve it! Will 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#2049