Detailed Documentation #841

Closed
opened 2026-02-04 22:27:02 +03:00 by OVERLORD · 9 comments
Owner

Originally created by @meminens on GitHub (Oct 4, 2018).

Describe the feature you'd like
Detailed documentation. Especially how to install BookStack in a subfolder like https://abc.xyz/bookstack

https://www.bookstackapp.com/docs/admin/installation/ This is so brief!

Describe the benefits this feature would bring to BookStack users
So I can install properly.

Additional context
Spent hours in apache configuration files and the Internets. Still could not figure out what's wrong with installation.

Originally created by @meminens on GitHub (Oct 4, 2018). **Describe the feature you'd like** Detailed documentation. Especially how to install BookStack in a subfolder like https://abc.xyz/bookstack https://www.bookstackapp.com/docs/admin/installation/ This is so brief! **Describe the benefits this feature would bring to BookStack users** So I can install properly. **Additional context** Spent hours in apache configuration files and the Internets. Still could not figure out what's wrong with installation.
OVERLORD added the 🐕 Support📖 Docs Update labels 2026-02-04 22:27:02 +03:00
Author
Owner

@meminens commented on GitHub (Oct 4, 2018):

I have got other web apps running on my Ubuntu VPS server on the same domain. I cannot make DocumentRoot Bookstack's public folder.

@meminens commented on GitHub (Oct 4, 2018): I have got other web apps running on my Ubuntu VPS server on the same domain. I cannot make DocumentRoot Bookstack's public folder.
Author
Owner

@lostdesign commented on GitHub (Oct 4, 2018):

The standard docs might be little bit slim, but its just a laravel application - further more, its just a php webapp.

Digital Ocean has many articles on how to configure a server. What you need to do is write a server block in your webserver config files:

#nginx
...
location /bockstack {
    root /var/www/bookstack/public
}
#apache
...
Alias /bockstack /var/www/bookstack/public
...
@lostdesign commented on GitHub (Oct 4, 2018): The standard docs might be little bit slim, but its just a laravel application - further more, its just a php webapp. Digital Ocean has many articles on how to configure a server. What you need to do is write a server block in your webserver config files: ``` #nginx ... location /bockstack { root /var/www/bookstack/public } ``` ``` #apache ... Alias /bockstack /var/www/bookstack/public ... ```
Author
Owner

@meminens commented on GitHub (Oct 4, 2018):

Thank you. But I do already have various apps installed on my server like Nextcloud. My problem is specific bto BookStack due to its requirement that DocumentRoot must point to public folder. I can't do that because of other installations on my server. Root domain is DocumentRoot in my case. And BookStack is not happy. Only way it works is when BoolStack folder is accessible from the web. Which obviously silly since everybody can see the .env file. So there's that... I tried many different options and nothing worked including your suggestion of Alias.

Mine is a Ubuntu Apache VPS server from Digital Ocean.

@meminens commented on GitHub (Oct 4, 2018): Thank you. But I do already have various apps installed on my server like Nextcloud. My problem is specific bto BookStack due to its requirement that DocumentRoot must point to public folder. I can't do that because of other installations on my server. Root domain is DocumentRoot in my case. And BookStack is not happy. Only way it works is when BoolStack folder is accessible from the web. Which obviously silly since everybody can see the .env file. So there's that... I tried many different options and nothing worked including your suggestion of Alias. Mine is a Ubuntu Apache VPS server from Digital Ocean.
Author
Owner

@lithium-ap commented on GitHub (Oct 4, 2018):

What the previous poster showed in the config is how you achieve this.

This will route the xyz.com/bookstack request to the /path/to/your/installation

#apache
...
Alias /bookstack /var/www/bookstack/public
...

@lithium-ap commented on GitHub (Oct 4, 2018): What the previous poster showed in the config is how you achieve this. This will route the xyz.com/bookstack request to the /path/to/your/installation #apache ... Alias /bookstack /var/www/bookstack/public ...
Author
Owner

@meminens commented on GitHub (Oct 4, 2018):

@lithium-ap I've added the exact same Alias into the virtual host .conf file but I am getting a 403 error somehow. So is the alias expected to work properly without setting DocumentRoot to public folder?

@meminens commented on GitHub (Oct 4, 2018): @lithium-ap I've added the exact same Alias into the virtual host .conf file but I am getting a 403 error somehow. So is the alias expected to work properly without setting DocumentRoot to public folder?
Author
Owner

@meminens commented on GitHub (Oct 6, 2018):

[Fri Oct 05 21:42:29.379034 2018] [core:error] [pid 19424] [client 75.187.71.158:49777] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

Alias command causes the above problem. I don't have this problem with my other web apps. And the Alias is set as follows in bookstack.conf which is enabled.

Alias /BookStack "/var/www/xxx.com/html/BookStack/public/"

 <Directory /var/www/xxx.com/html/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>
@meminens commented on GitHub (Oct 6, 2018): `[Fri Oct 05 21:42:29.379034 2018] [core:error] [pid 19424] [client 75.187.71.158:49777] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.` Alias command causes the above problem. I don't have this problem with my other web apps. And the Alias is set as follows in `bookstack.conf` which is enabled. ``` Alias /BookStack "/var/www/xxx.com/html/BookStack/public/" <Directory /var/www/xxx.com/html/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> ```
Author
Owner

@ssddanbrown commented on GitHub (Oct 6, 2018):

Thanks @lostdesign and @lithium-ap for providing support on this so far.

@bisherbas I've just tested this process myself. I believe the redirects may be due to the Alias leading to a subfolder which catches the alias again and gets stuck in a redirect loop).

Ideally you'd need to store the BookStack install outside of the main website folder. For example, move your /var/www/xxx.com/html/BookStack folder to /var/www/BookStack then update the alias and directory paths to point to the new location. This also helps to ensure the non-public BookStack files remain private.

To help with this for people in the future I've added a page to the documentation which can be found here:
https://www.bookstackapp.com/docs/admin/subdirectory-setup/

Hope this info helps, Let me know how you get on.

PS, Sorry for the install difficulty. I can understand this is more complex process compared to other, popular, PHP applications you have installed.

@ssddanbrown commented on GitHub (Oct 6, 2018): Thanks @lostdesign and @lithium-ap for providing support on this so far. @bisherbas I've just tested this process myself. I believe the redirects may be due to the Alias leading to a subfolder which catches the alias again and gets stuck in a redirect loop). Ideally you'd need to store the BookStack install outside of the main website folder. For example, move your `/var/www/xxx.com/html/BookStack` folder to `/var/www/BookStack` then update the alias and directory paths to point to the new location. This also helps to ensure the non-public BookStack files remain private. To help with this for people in the future I've added a page to the documentation which can be found here: https://www.bookstackapp.com/docs/admin/subdirectory-setup/ Hope this info helps, Let me know how you get on. _PS, Sorry for the install difficulty. I can understand this is more complex process compared to other, popular, PHP applications you have installed._
Author
Owner

@meminens commented on GitHub (Oct 6, 2018):

@ssdanbrown Thank you so much for the elabarote documentation on the subdirectory installation. I followed your instructions and everything works great. Except #1048 issue still persists.

@meminens commented on GitHub (Oct 6, 2018): @ssdanbrown Thank you so much for the elabarote documentation on the subdirectory installation. I followed your instructions and everything works great. Except #1048 issue still persists.
Author
Owner

@ssddanbrown commented on GitHub (Oct 13, 2018):

Since docs have been updated I'll close this. I'll respond to your other issue separately.

@ssddanbrown commented on GitHub (Oct 13, 2018): Since docs have been updated I'll close this. I'll respond to your other issue separately.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#841