Error 404 after install #847

Closed
opened 2026-02-04 22:28:55 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @sigmap on GitHub (Oct 7, 2018).

Running bookstack with a vhost that points to bookstack.localhost
From httpd-vhosts.conf

<VirtualHost *:80>
       ServerAlias bookstack.localhost
       #Redirect 301 / https://bookstack.localhost
       DocumentRoot "C:/xampp/subdomains/BookStack/public/"
        <Directory "C:/xampp/subdomains/BookStack/public/">
        Options None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

BookStack/Public/.htaccess

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    Options +SymLinksIfOwnerMatch
    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]
</IfModule>

Am I missing something?

Configuration

  • Exact BookStack Version: 0.24.1
  • PHP Version: 7.2.9
  • Hosting Method: xampp/Apache
Originally created by @sigmap on GitHub (Oct 7, 2018). Running bookstack with a vhost that points to bookstack.localhost From `httpd-vhosts.conf` ``` <VirtualHost *:80> ServerAlias bookstack.localhost #Redirect 301 / https://bookstack.localhost DocumentRoot "C:/xampp/subdomains/BookStack/public/" <Directory "C:/xampp/subdomains/BookStack/public/"> Options None Order allow,deny Allow from all </Directory> </VirtualHost> ``` `BookStack/Public/.htaccess` ``` <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> Options +SymLinksIfOwnerMatch 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] </IfModule> ``` Am I missing something? **Configuration** - Exact BookStack Version: 0.24.1 - PHP Version: 7.2.9 - Hosting Method: xampp/Apache
OVERLORD added the 🐕 Support label 2026-02-04 22:28:55 +03:00
Author
Owner

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

  • Are you redirected to a certain URL when you try to access your instance?
  • Is apache mod_rewrite enabled?
  • Is the 404 page an apache (Blank-looking) page or a BookStack page (Non-blank looking).
@ssddanbrown commented on GitHub (Oct 13, 2018): - Are you redirected to a certain URL when you try to access your instance? - Is apache mod_rewrite enabled? - Is the 404 page an apache (Blank-looking) page or a BookStack page (Non-blank looking).
Author
Owner

@sigmap commented on GitHub (Nov 5, 2018):

I commented out the redirect to see if I could at least access it first. The redirect doesn't happen and is a non-issue atm. The 404 was an apache page. mod_rewrite is enabled.

I tried a clean git clone this time. Process gets a 500 error on chrome, but an empty white page in firefox.

<VirtualHost *:80>
       ServerAlias book.localhost
       <Directory "C:/xampp/htdocs/book/public/">
            Require all granted
            AllowOverride All
            #Options +Indexes
       </Directory>
       DocumentRoot "C:/xampp/htdocs/book/public/"
       ServerName book.localhost
</VirtualHost>
@sigmap commented on GitHub (Nov 5, 2018): I commented out the redirect to see if I could at least access it first. The redirect doesn't happen and is a non-issue atm. The 404 was an apache page. `mod_rewrite` is enabled. I tried a clean git clone this time. Process gets a 500 error on chrome, but an empty white page in firefox. ``` <VirtualHost *:80> ServerAlias book.localhost <Directory "C:/xampp/htdocs/book/public/"> Require all granted AllowOverride All #Options +Indexes </Directory> DocumentRoot "C:/xampp/htdocs/book/public/" ServerName book.localhost </VirtualHost> ```
Author
Owner

@sigmap commented on GitHub (Nov 6, 2018):

I decided to check the log. I don't think this is supposed to happen.

 [php7:error] [pid 4036:tid 1640] [client 127.0.0.1:11903] PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'system_name' in 'where clause' in C:\\xampp\\htdocs\\book\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php:77\nStack trace:\n#0 C:\\xampp\\htdocs\\book\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php(77): PDO->prepare('select * from `...', Array)\n#1 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(326): Doctrine\\DBAL\\Driver\\PDOConnection->prepare('select * from `...')\n#2 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(657): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('select * from `...', Array)\n#3 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(624): Illuminate\\Database\\Connection->runQueryCallback('select * from `...', Array, Object(Closure))\n#4 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(333): Illuminate\\Database\\Connection->run('select * f in C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php on line 664
 [php7:error] [pid 4036:tid 1640] [client 127.0.0.1:11903] PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'system_name' in 'where clause' in C:\\xampp\\htdocs\\book\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php:77\nStack trace:\n#0 C:\\xampp\\htdocs\\book\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php(77): PDO->prepare('select * from `...', Array)\n#1 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(326): Doctrine\\DBAL\\Driver\\PDOConnection->prepare('select * from `...')\n#2 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(657): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('select * from `...', Array)\n#3 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(624): Illuminate\\Database\\Connection->runQueryCallback('select * from `...', Array, Object(Closure))\n#4 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(333): Illuminate\\Database\\Connection->run('select * f in C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php on line 664

Is there a command in artisan I can run to fix this?

@sigmap commented on GitHub (Nov 6, 2018): I decided to check the log. I don't think this is supposed to happen. ``` [php7:error] [pid 4036:tid 1640] [client 127.0.0.1:11903] PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'system_name' in 'where clause' in C:\\xampp\\htdocs\\book\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php:77\nStack trace:\n#0 C:\\xampp\\htdocs\\book\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php(77): PDO->prepare('select * from `...', Array)\n#1 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(326): Doctrine\\DBAL\\Driver\\PDOConnection->prepare('select * from `...')\n#2 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(657): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('select * from `...', Array)\n#3 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(624): Illuminate\\Database\\Connection->runQueryCallback('select * from `...', Array, Object(Closure))\n#4 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(333): Illuminate\\Database\\Connection->run('select * f in C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php on line 664 [php7:error] [pid 4036:tid 1640] [client 127.0.0.1:11903] PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'system_name' in 'where clause' in C:\\xampp\\htdocs\\book\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php:77\nStack trace:\n#0 C:\\xampp\\htdocs\\book\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php(77): PDO->prepare('select * from `...', Array)\n#1 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(326): Doctrine\\DBAL\\Driver\\PDOConnection->prepare('select * from `...')\n#2 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(657): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('select * from `...', Array)\n#3 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(624): Illuminate\\Database\\Connection->runQueryCallback('select * from `...', Array, Object(Closure))\n#4 C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(333): Illuminate\\Database\\Connection->run('select * f in C:\\xampp\\htdocs\\book\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php on line 664 ``` Is there a command in artisan I can run to fix this?
Author
Owner

@sigmap commented on GitHub (Nov 6, 2018):

I tried running php artisan migrate and it did say the database was migrated successfully, but then there was this afterwards

 [Doctrine\DBAL\Driver\PDOException]
 SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.



 [PDOException]
 SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
@sigmap commented on GitHub (Nov 6, 2018): I tried running `php artisan migrate` and it did say the database was migrated successfully, but then there was this afterwards ``` [Doctrine\DBAL\Driver\PDOException] SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. [PDOException] SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. ```
Author
Owner

@sigmap commented on GitHub (Nov 6, 2018):

Update 3:

dropped the database I created originally and made a new one and set collation to utf8mb4_unicode_ci. ran 'php artisan migrate` again too. Database population took forever this time but finished. So it seems it's sensitive to the collation.

I think it works now. Sign in seems to work fine. Close and maybe tag as resolved?

**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated:  2014_10_12_000000_create_users_table
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated:  2014_10_12_100000_create_password_resets_table
Migrating: 2015_07_12_114933_create_books_table
Migrated:  2015_07_12_114933_create_books_table
Migrating: 2015_07_12_190027_create_pages_table
Migrated:  2015_07_12_190027_create_pages_table
Migrating: 2015_07_13_172121_create_images_table
Migrated:  2015_07_13_172121_create_images_table
Migrating: 2015_07_27_172342_create_chapters_table
Migrated:  2015_07_27_172342_create_chapters_table
Migrating: 2015_08_08_200447_add_users_to_entities
Migrated:  2015_08_08_200447_add_users_to_entities
Migrating: 2015_08_09_093534_create_page_revisions_table
Migrated:  2015_08_09_093534_create_page_revisions_table
Migrating: 2015_08_16_142133_create_activities_table
Migrated:  2015_08_16_142133_create_activities_table
Migrating: 2015_08_29_105422_add_roles_and_permissions
Migrated:  2015_08_29_105422_add_roles_and_permissions
Migrating: 2015_08_30_125859_create_settings_table
Migrated:  2015_08_30_125859_create_settings_table
Migrating: 2015_08_31_175240_add_search_indexes
Migrated:  2015_08_31_175240_add_search_indexes
Migrating: 2015_09_04_165821_create_social_accounts_table
Migrated:  2015_09_04_165821_create_social_accounts_table
Migrating: 2015_09_05_164707_add_email_confirmation_table
Migrated:  2015_09_05_164707_add_email_confirmation_table
Migrating: 2015_11_21_145609_create_views_table
Migrated:  2015_11_21_145609_create_views_table
Migrating: 2015_11_26_221857_add_entity_indexes
Migrated:  2015_11_26_221857_add_entity_indexes
Migrating: 2015_12_05_145049_fulltext_weighting
Migrated:  2015_12_05_145049_fulltext_weighting
Migrating: 2015_12_07_195238_add_image_upload_types
Migrated:  2015_12_07_195238_add_image_upload_types
Migrating: 2015_12_09_195748_add_user_avatars
Migrated:  2015_12_09_195748_add_user_avatars
Migrating: 2016_01_11_210908_add_external_auth_to_users
Migrated:  2016_01_11_210908_add_external_auth_to_users
Migrating: 2016_02_25_184030_add_slug_to_revisions
Migrated:  2016_02_25_184030_add_slug_to_revisions
Migrating: 2016_02_27_120329_update_permissions_and_roles
Migrated:  2016_02_27_120329_update_permissions_and_roles
Migrating: 2016_02_28_084200_add_entity_access_controls
Migrated:  2016_02_28_084200_add_entity_access_controls
Migrating: 2016_03_09_203143_add_page_revision_types
Migrated:  2016_03_09_203143_add_page_revision_types
Migrating: 2016_03_13_082138_add_page_drafts
Migrated:  2016_03_13_082138_add_page_drafts
Migrating: 2016_03_25_123157_add_markdown_support
Migrated:  2016_03_25_123157_add_markdown_support
Migrating: 2016_04_09_100730_add_view_permissions_to_roles
Migrated:  2016_04_09_100730_add_view_permissions_to_roles
Migrating: 2016_04_20_192649_create_joint_permissions_table
Migrated:  2016_04_20_192649_create_joint_permissions_table
Migrating: 2016_05_06_185215_create_tags_table
Migrated:  2016_05_06_185215_create_tags_table
Migrating: 2016_07_07_181521_add_summary_to_page_revisions
Migrated:  2016_07_07_181521_add_summary_to_page_revisions
Migrating: 2016_09_29_101449_remove_hidden_roles
Migrated:  2016_09_29_101449_remove_hidden_roles
Migrating: 2016_10_09_142037_create_attachments_table
Migrated:  2016_10_09_142037_create_attachments_table
Migrating: 2017_01_21_163556_create_cache_table
Migrated:  2017_01_21_163556_create_cache_table
Migrating: 2017_01_21_163602_create_sessions_table
Migrated:  2017_01_21_163602_create_sessions_table
Migrating: 2017_03_19_091553_create_search_index_table
Migrated:  2017_03_19_091553_create_search_index_table
Migrating: 2017_04_20_185112_add_revision_counts
Migrated:  2017_04_20_185112_add_revision_counts
Migrating: 2017_07_02_152834_update_db_encoding_to_ut8mb4
Migrated:  2017_07_02_152834_update_db_encoding_to_ut8mb4
Migrating: 2017_08_01_130541_create_comments_table
Migrated:  2017_08_01_130541_create_comments_table
Migrating: 2017_08_29_102650_add_cover_image_display
Migrated:  2017_08_29_102650_add_cover_image_display
Migrating: 2018_07_15_173514_add_role_external_auth_id
Migrated:  2018_07_15_173514_add_role_external_auth_id
Migrating: 2018_08_04_115700_create_bookshelves_table
Migrated:  2018_08_04_115700_create_bookshelves_table
@sigmap commented on GitHub (Nov 6, 2018): Update 3: dropped the database I created originally and made a new one and set collation to `utf8mb4_unicode_ci`. ran 'php artisan migrate` again too. Database population took forever this time but finished. So it seems it's sensitive to the collation. I think it works now. Sign in seems to work fine. Close and maybe tag as resolved? ``` ************************************** * Application In Production! * ************************************** Do you really wish to run this command? (yes/no) [no]: > yes Migration table created successfully. Migrating: 2014_10_12_000000_create_users_table Migrated: 2014_10_12_000000_create_users_table Migrating: 2014_10_12_100000_create_password_resets_table Migrated: 2014_10_12_100000_create_password_resets_table Migrating: 2015_07_12_114933_create_books_table Migrated: 2015_07_12_114933_create_books_table Migrating: 2015_07_12_190027_create_pages_table Migrated: 2015_07_12_190027_create_pages_table Migrating: 2015_07_13_172121_create_images_table Migrated: 2015_07_13_172121_create_images_table Migrating: 2015_07_27_172342_create_chapters_table Migrated: 2015_07_27_172342_create_chapters_table Migrating: 2015_08_08_200447_add_users_to_entities Migrated: 2015_08_08_200447_add_users_to_entities Migrating: 2015_08_09_093534_create_page_revisions_table Migrated: 2015_08_09_093534_create_page_revisions_table Migrating: 2015_08_16_142133_create_activities_table Migrated: 2015_08_16_142133_create_activities_table Migrating: 2015_08_29_105422_add_roles_and_permissions Migrated: 2015_08_29_105422_add_roles_and_permissions Migrating: 2015_08_30_125859_create_settings_table Migrated: 2015_08_30_125859_create_settings_table Migrating: 2015_08_31_175240_add_search_indexes Migrated: 2015_08_31_175240_add_search_indexes Migrating: 2015_09_04_165821_create_social_accounts_table Migrated: 2015_09_04_165821_create_social_accounts_table Migrating: 2015_09_05_164707_add_email_confirmation_table Migrated: 2015_09_05_164707_add_email_confirmation_table Migrating: 2015_11_21_145609_create_views_table Migrated: 2015_11_21_145609_create_views_table Migrating: 2015_11_26_221857_add_entity_indexes Migrated: 2015_11_26_221857_add_entity_indexes Migrating: 2015_12_05_145049_fulltext_weighting Migrated: 2015_12_05_145049_fulltext_weighting Migrating: 2015_12_07_195238_add_image_upload_types Migrated: 2015_12_07_195238_add_image_upload_types Migrating: 2015_12_09_195748_add_user_avatars Migrated: 2015_12_09_195748_add_user_avatars Migrating: 2016_01_11_210908_add_external_auth_to_users Migrated: 2016_01_11_210908_add_external_auth_to_users Migrating: 2016_02_25_184030_add_slug_to_revisions Migrated: 2016_02_25_184030_add_slug_to_revisions Migrating: 2016_02_27_120329_update_permissions_and_roles Migrated: 2016_02_27_120329_update_permissions_and_roles Migrating: 2016_02_28_084200_add_entity_access_controls Migrated: 2016_02_28_084200_add_entity_access_controls Migrating: 2016_03_09_203143_add_page_revision_types Migrated: 2016_03_09_203143_add_page_revision_types Migrating: 2016_03_13_082138_add_page_drafts Migrated: 2016_03_13_082138_add_page_drafts Migrating: 2016_03_25_123157_add_markdown_support Migrated: 2016_03_25_123157_add_markdown_support Migrating: 2016_04_09_100730_add_view_permissions_to_roles Migrated: 2016_04_09_100730_add_view_permissions_to_roles Migrating: 2016_04_20_192649_create_joint_permissions_table Migrated: 2016_04_20_192649_create_joint_permissions_table Migrating: 2016_05_06_185215_create_tags_table Migrated: 2016_05_06_185215_create_tags_table Migrating: 2016_07_07_181521_add_summary_to_page_revisions Migrated: 2016_07_07_181521_add_summary_to_page_revisions Migrating: 2016_09_29_101449_remove_hidden_roles Migrated: 2016_09_29_101449_remove_hidden_roles Migrating: 2016_10_09_142037_create_attachments_table Migrated: 2016_10_09_142037_create_attachments_table Migrating: 2017_01_21_163556_create_cache_table Migrated: 2017_01_21_163556_create_cache_table Migrating: 2017_01_21_163602_create_sessions_table Migrated: 2017_01_21_163602_create_sessions_table Migrating: 2017_03_19_091553_create_search_index_table Migrated: 2017_03_19_091553_create_search_index_table Migrating: 2017_04_20_185112_add_revision_counts Migrated: 2017_04_20_185112_add_revision_counts Migrating: 2017_07_02_152834_update_db_encoding_to_ut8mb4 Migrated: 2017_07_02_152834_update_db_encoding_to_ut8mb4 Migrating: 2017_08_01_130541_create_comments_table Migrated: 2017_08_01_130541_create_comments_table Migrating: 2017_08_29_102650_add_cover_image_display Migrated: 2017_08_29_102650_add_cover_image_display Migrating: 2018_07_15_173514_add_role_external_auth_id Migrated: 2018_07_15_173514_add_role_external_auth_id Migrating: 2018_08_04_115700_create_bookshelves_table Migrated: 2018_08_04_115700_create_bookshelves_table ```
Author
Owner

@ssddanbrown commented on GitHub (Nov 10, 2018):

@sigmap Thanks for confirming it's resolved. Happy to hear you got things working.

@ssddanbrown commented on GitHub (Nov 10, 2018): @sigmap Thanks for confirming it's resolved. Happy to hear you got things working.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#847