Sorry, The page you were looking for could not be found error immediately after install #961

Closed
opened 2026-02-04 23:10:26 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @danikuci1 on GitHub (Dec 20, 2018).

Describe the bug
After install, receive a Sorry, The page you were looking for could not be found. error on any page visited.

Steps To Reproduce
Steps to reproduce the behavior:
-followed install instructions, installed in subdirectory.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.24.3 "release branch"
  • PHP Version: 7.1.14
  • Hosting Method (Nginx/Apache/Docker): apache on VPS

Additional context

  • using caddy as reverse proxy to apache server.
  • no errors in apache log
  • rewrite rules appear to be functioning properly, judging by the address bar as I click around

env file contents

# Environment
APP_ENV=production
APP_DEBUG=false
APP_KEY=app key

# The below url has to be set if using social auth options
# or if you are not using BookStack at the root path of your domain.
APP_URL=https://mysite.com/docs

# Database details
DB_HOST=localhost
DB_DATABASE=bookstack
DB_USERNAME=bookstack
DB_PASSWORD=password

# Cache and session
CACHE_DRIVER=file
SESSION_DRIVER=file
# If using Memcached, comment the above and uncomment these
#CACHE_DRIVER=memcached
#SESSION_DRIVER=memcached
QUEUE_DRIVER=sync
# A different prefix is useful when multiple BookStack instances use the same caching server
CACHE_PREFIX=bookstack

# Memcached settings
# If using a UNIX socket path for the host, set the port to 0
# This follows the following format: HOST:PORT:WEIGHT
# For multiple servers separate with a comma
MEMCACHED_SERVERS=127.0.0.1:11211:100

# Storage
STORAGE_TYPE=local
# Amazon S3 Config
STORAGE_S3_KEY=false
STORAGE_S3_SECRET=false
STORAGE_S3_REGION=false
STORAGE_S3_BUCKET=false
# Storage URL
# Used to prefix image urls for when using custom domains/cdns
STORAGE_URL=false

# General auth
AUTH_METHOD=ldap

# Social Authentication information. Defaults as off.
GITHUB_APP_ID=false
GITHUB_APP_SECRET=false
GOOGLE_APP_ID=false
GOOGLE_APP_SECRET=false
GOOGLE_SELECT_ACCOUNT=false
OKTA_BASE_URL=false
OKTA_APP_ID=false
OKTA_APP_SECRET=false
TWITCH_APP_ID=false
TWITCH_APP_SECRET=false
GITLAB_APP_ID=false
GITLAB_APP_SECRET=false
GITLAB_BASE_URI=false
DISCORD_APP_ID=false
DISCORD_APP_SECRET=false

# External services such as Gravatar and Draw.IO
DISABLE_EXTERNAL_SERVICES=false

# LDAP Settings
LDAP_SERVER=192.168.0.205
LDAP_BASE_DN="CN=BookStack Users,OU=People,DC=sandbox,DC=lab"
LDAP_DN="CN=BookStack,OU=Service Accounts,DC=site,DC=com"
LDAP_PASS=password
LDAP_USER_FILTER=(&(sAMAccountName=${user}))
LDAP_VERSION=3
# Do you want to sync LDAP groups to BookStack roles for a user
LDAP_USER_TO_GROUPS=true
# What is the LDAP attribute for group memberships
LDAP_GROUP_ATTRIBUTE="memberOf"
# Would you like to remove users from roles on BookStack if they do not match on LDAP
# If false, the ldap groups-roles sync will only add users to roles
LDAP_REMOVE_FROM_GROUPS=true

# Mail settings
MAIL_DRIVER=smtp
MAIL_HOST=smtp-mail.outlook.com
MAIL_PORT=587
MAIL_USERNAME=email@outlook.com
MAIL_PASSWORD=password
MAIL_ENCRYPTION=TLS
MAIL_FROM=email@outlook.com
MAIL_FROM_NAME="Some Name BookStack"


vhost contents

<VirtualHost *:80>

    # docs Configuration
    Alias "/docs" "/path/to/docs/public"

    <Directory "/path/to/docs/public">
      Options FollowSymlinks
      AllowOverride None
      Require all granted

      RewriteEngine On
      # Redirect Trailing Slashes If Not A Folder...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)/$ /$1 [L,R=301]

      # Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
    </Directory>


    <Directory "/path/to/docs">
      AllowOverride None
      Require all denied
    </Directory>
    # End docs Configuration
		DocumentRoot "/path/to/docs/public"
		ServerName mysite.com
		
</VirtualHost>

Originally created by @danikuci1 on GitHub (Dec 20, 2018). **Describe the bug** After install, receive a `Sorry, The page you were looking for could not be found.` error on any page visited. **Steps To Reproduce** Steps to reproduce the behavior: -followed install instructions, installed in subdirectory. **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.24.3 "release branch" - PHP Version: 7.1.14 - Hosting Method (Nginx/Apache/Docker): apache on VPS **Additional context** - using caddy as reverse proxy to apache server. - no errors in apache log - rewrite rules appear to be functioning properly, judging by the address bar as I click around **env file contents** ``` # Environment APP_ENV=production APP_DEBUG=false APP_KEY=app key # The below url has to be set if using social auth options # or if you are not using BookStack at the root path of your domain. APP_URL=https://mysite.com/docs # Database details DB_HOST=localhost DB_DATABASE=bookstack DB_USERNAME=bookstack DB_PASSWORD=password # Cache and session CACHE_DRIVER=file SESSION_DRIVER=file # If using Memcached, comment the above and uncomment these #CACHE_DRIVER=memcached #SESSION_DRIVER=memcached QUEUE_DRIVER=sync # A different prefix is useful when multiple BookStack instances use the same caching server CACHE_PREFIX=bookstack # Memcached settings # If using a UNIX socket path for the host, set the port to 0 # This follows the following format: HOST:PORT:WEIGHT # For multiple servers separate with a comma MEMCACHED_SERVERS=127.0.0.1:11211:100 # Storage STORAGE_TYPE=local # Amazon S3 Config STORAGE_S3_KEY=false STORAGE_S3_SECRET=false STORAGE_S3_REGION=false STORAGE_S3_BUCKET=false # Storage URL # Used to prefix image urls for when using custom domains/cdns STORAGE_URL=false # General auth AUTH_METHOD=ldap # Social Authentication information. Defaults as off. GITHUB_APP_ID=false GITHUB_APP_SECRET=false GOOGLE_APP_ID=false GOOGLE_APP_SECRET=false GOOGLE_SELECT_ACCOUNT=false OKTA_BASE_URL=false OKTA_APP_ID=false OKTA_APP_SECRET=false TWITCH_APP_ID=false TWITCH_APP_SECRET=false GITLAB_APP_ID=false GITLAB_APP_SECRET=false GITLAB_BASE_URI=false DISCORD_APP_ID=false DISCORD_APP_SECRET=false # External services such as Gravatar and Draw.IO DISABLE_EXTERNAL_SERVICES=false # LDAP Settings LDAP_SERVER=192.168.0.205 LDAP_BASE_DN="CN=BookStack Users,OU=People,DC=sandbox,DC=lab" LDAP_DN="CN=BookStack,OU=Service Accounts,DC=site,DC=com" LDAP_PASS=password LDAP_USER_FILTER=(&(sAMAccountName=${user})) LDAP_VERSION=3 # Do you want to sync LDAP groups to BookStack roles for a user LDAP_USER_TO_GROUPS=true # What is the LDAP attribute for group memberships LDAP_GROUP_ATTRIBUTE="memberOf" # Would you like to remove users from roles on BookStack if they do not match on LDAP # If false, the ldap groups-roles sync will only add users to roles LDAP_REMOVE_FROM_GROUPS=true # Mail settings MAIL_DRIVER=smtp MAIL_HOST=smtp-mail.outlook.com MAIL_PORT=587 MAIL_USERNAME=email@outlook.com MAIL_PASSWORD=password MAIL_ENCRYPTION=TLS MAIL_FROM=email@outlook.com MAIL_FROM_NAME="Some Name BookStack" ``` **vhost contents** ``` <VirtualHost *:80> # docs Configuration Alias "/docs" "/path/to/docs/public" <Directory "/path/to/docs/public"> Options FollowSymlinks AllowOverride None Require all granted RewriteEngine On # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </Directory> <Directory "/path/to/docs"> AllowOverride None Require all denied </Directory> # End docs Configuration DocumentRoot "/path/to/docs/public" ServerName mysite.com </VirtualHost> ```
OVERLORD added the 🐕 Support label 2026-02-04 23:10:26 +03:00
Author
Owner

@danikuci1 commented on GitHub (Dec 20, 2018):

thanks in advance for your help

@danikuci1 commented on GitHub (Dec 20, 2018): thanks in advance for your help
Author
Owner

@ssddanbrown commented on GitHub (Dec 20, 2018):

Hi @danikuci1,
Sorry to hear you are facing issues.

Are you able to post a screenshot of the error page? It will help identify if BookStack is generating the error of if it's being created by your webserver.

@ssddanbrown commented on GitHub (Dec 20, 2018): Hi @danikuci1, Sorry to hear you are facing issues. Are you able to post a screenshot of the error page? It will help identify if BookStack is generating the error of if it's being created by your webserver.
Author
Owner

@danikuci1 commented on GitHub (Dec 20, 2018):

thanks for the reply. here's the screen cap:

image

my personal guess is that something is wrong in the web server config. however, as ive followed the instructions, im not sure where my error is exactly.

@danikuci1 commented on GitHub (Dec 20, 2018): thanks for the reply. here's the screen cap: ![image](https://user-images.githubusercontent.com/5247319/50309335-4cdf2580-0453-11e9-9702-07b1dbdb1036.png) my personal guess is that something is wrong in the web server config. however, as ive followed the instructions, im not sure where my error is exactly.
Author
Owner

@danikuci1 commented on GitHub (Dec 22, 2018):

rather than attempt to get this working as is, I created a new VM with fresh install of ubuntu 18.04 and attempted to use your script to install but it ran into errors as well.

image

@danikuci1 commented on GitHub (Dec 22, 2018): rather than attempt to get this working as is, I created a new VM with fresh install of ubuntu 18.04 and attempted to use your script to install but it ran into errors as well. ![image](https://user-images.githubusercontent.com/5247319/50365633-6010f480-052a-11e9-9c10-ee0e654cd6ce.png)
Author
Owner

@ssddanbrown commented on GitHub (Dec 24, 2018):

@danikuci1 Looks like it couldn't find the php packages. For some people the ubuntu universe repository was not enabled which was cause this. Just merged in a fix to the install scripts for this, Otherwise you could try sudo add-apt-repository universe and run the script again.

@ssddanbrown commented on GitHub (Dec 24, 2018): @danikuci1 Looks like it couldn't find the php packages. For some people the ubuntu `universe` repository was not enabled which was cause this. Just merged in a fix to the install scripts for this, Otherwise you could try `sudo add-apt-repository universe` and run the script again.
Author
Owner

@danikuci1 commented on GitHub (Dec 26, 2018):

@ssddanbrown thanks for the updated script, i was able to get bookstack installed on the fresh, new server.

two problems i am having now:

  1. i attempted to edit the apache config to move the website from the public root to a subdirectory. i am getting the exact same result as on the original server: Sorry, The page you were looking for could not be found

  2. i cannot get LDAP authentication to work. is there somewhere that errors are logged? i am not able to see anything from the LDAP side, no authentication errors or anything and LDAP is working fine for other apps, for example nextcloud.

as i've attempted this twice now i suspect something may be lacking in the instructions or i am missing something. can you please look at the above config files and let me know if I am missing something?

thanks in advance and merry christmas

@danikuci1 commented on GitHub (Dec 26, 2018): @ssddanbrown thanks for the updated script, i was able to get bookstack installed on the fresh, new server. two problems i am having now: 1. i attempted to edit the apache config to move the website from the public root to a subdirectory. i am getting the exact same result as on the original server: `Sorry, The page you were looking for could not be found` 1. i cannot get LDAP authentication to work. is there somewhere that errors are logged? i am not able to see anything from the LDAP side, no authentication errors or anything and LDAP is working fine for other apps, for example nextcloud. as i've attempted this twice now i suspect something may be lacking in the instructions or i am missing something. can you please look at the above config files and let me know if I am missing something? thanks in advance and merry christmas
Author
Owner

@ssddanbrown commented on GitHub (Dec 28, 2018):

@danikuci1

  1. Nothing immediately obvious in the above config, Does it work if you go straight to the apache server, not proxied via caddy?
  2. Details of where errors are logged, include general debugging information can be found here: https://www.bookstackapp.com/docs/admin/debugging/. If you're not seeing errors thrown you might not get anything in the logs though.
@ssddanbrown commented on GitHub (Dec 28, 2018): @danikuci1 1. Nothing immediately obvious in the above config, Does it work if you go straight to the apache server, not proxied via caddy? 2. Details of where errors are logged, include general debugging information can be found here: https://www.bookstackapp.com/docs/admin/debugging/. If you're not seeing errors thrown you might not get anything in the logs though.
Author
Owner

@ssddanbrown commented on GitHub (May 18, 2019):

Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.

@ssddanbrown commented on GitHub (May 18, 2019): Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#961