Can bookstack be used without virtualhost? #774

Closed
opened 2026-02-04 22:14:44 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @pth0rn on GitHub (Aug 13, 2018).

So the documentation and any guides I see for this use a virtualhost on the web server to access bookstack. However I don't want bookstack to be the root site on the web server nor do I want to have to use a port other than 80.
Can I not set this up on apache to be access via just http://server/bookstack ?

Originally created by @pth0rn on GitHub (Aug 13, 2018). So the documentation and any guides I see for this use a virtualhost on the web server to access bookstack. However I don't want bookstack to be the root site on the web server nor do I want to have to use a port other than 80. Can I not set this up on apache to be access via just http://server/bookstack ?
Author
Owner

@lostdesign commented on GitHub (Aug 16, 2018):

You cannot host any app on apache without using vhosts - i think you did not understand it's purpose.

A vhost is to resolve the users request and load the right site given by that configuration. The same is with your /bookstack - that is an alias and simply one line you need to add to your vhost config.

Furthermore you should not run any app on HTTP anymore which includes a login - 443/https is the way to go.

<VirtualHost *:443> 
    ServerName example.com
    DocumentRoot /var/www/bookstack

    # either one of these two alias
    Alias /bookstack
    Alias /bookstack "/var/www/bookstack     

    <Directory "/var/www/bookstack">
        Options None
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
@lostdesign commented on GitHub (Aug 16, 2018): You cannot host any app on apache without using vhosts - i think you did not understand it's purpose. A vhost is to resolve the users request and load the right site given by that configuration. The same is with your `/bookstack` - that is an alias and simply one line you need to add to your vhost config. Furthermore you should not run any app on HTTP anymore which includes a login - 443/https is the way to go. ``` <VirtualHost *:443> ServerName example.com DocumentRoot /var/www/bookstack # either one of these two alias Alias /bookstack Alias /bookstack "/var/www/bookstack <Directory "/var/www/bookstack"> Options None AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> ```
Author
Owner

@pth0rn commented on GitHub (Aug 21, 2018):

Many PHP web apps/sites can be used just via Directory directives without VirtualHosts, that's what I was after, since that fits my situation better. Thanks though.
However I'm not too concerned anymore and using a vhost isn't really a problem.

@pth0rn commented on GitHub (Aug 21, 2018): Many PHP web apps/sites can be used just via Directory directives without VirtualHosts, that's what I was after, since that fits my situation better. Thanks though. However I'm not too concerned anymore and using a vhost isn't really a problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#774