Score:0

Not found 404 with apache and bootstack

cn flag

the last two day I was trying to run bookstack with an apache webserver, which is hosted localy on my system. I'am not familiar with apache and bookstack. So this was my first try to host a local webserver und install bookstack on it.

The Apache server works fine so far and i can call localhost in the webbrowser to call specific index.php files from different directorys called by different ports e.g.:

  • localhost:3010 calls "./htdocs/test1/index.php"
  • localhost:3020 calls "./htdocs/test2/index.php"

I was following the instructions for manual installation of bookstack (https://www.bookstackapp.com/docs/admin/installation/#manual). I got no Errors during the process and the Database seems to work and. I copied the bookstack-Folder into ./htdocs/bookstack und add a Virtual Host to call ./htdocs/bookstack/public by localhost:3030.

<VirtualHost *:3030>

    # This is a simple example of an Apache VirtualHost configuration
    # file that could be used with BookStack.
    # This assumes mod_php has been installed and is loaded.
    #
    # Change the "docs.example.com" usage in the "ServerName" directive
    # to be your web domain for BookStack.
    #
    # Change the "/var/www/bookstack/public/", used twice below, to the
    # location of the "public" folder within your BookStack installation.
    #
    # This configuration is only for HTTP, Not HTTPS.
    # For HTTPS we recommend using https://certbot.eff.org/

    ServerName localhost:3030
    DocumentRoot "${SRVROOT}/htdocs/bookstack/public"

    <Directory "${SRVROOT}/htdocs/bookstack/public">
        Options Indexes FollowSymLinks
        AllowOverride All
        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>
</VirtualHost>

In the .env-File in .\htdocs\bookstack is APP_URL=/.

When I call localhost:3030 in the webbrowser the request will be redirected to localhost:3030/login automaticly and I get an 404 Error response.

Any Ideas what went wrong? I tried different values for APP_URL but without success.

Thanks for help in advance.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.