BookStack
BookStack copied to clipboard
BookStack https subinformation access show blank site
Attempted Debugging
- [X] I have read the debugging page
Searched GitHub Issues
- [X] I have searched GitHub for the issue.
Describe the Scenario
The site work on http prot. I can reach the main site, shelves, books and contents. But if chgange to https// I can reach the main site. If I click on shelves, books or contents, the server show:
Not Found! The requested URL was not found on this server. Apache/2.4.56 (Debian) Server at xyz.example.com Port 443
http config:
<VirtualHost *:80>
ServerName xyz.example.com
ServerAdmin [email protected]
DocumentRoot /var/www/html/BookStack/public/
<Directory /var/www/html/BookStack/public/>
Options FollowSymlinks
AllowOverride All FileInfo
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
SSL config: The cert show trusted in browsers ]
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerName xyz.example.com
ServerAdmin [email protected]
DocumentRoot /var/www/html/BookStack/public/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/xyz_2024.crt
SSLCertificateKeyFile /etc/ssl/private/xyz_2024.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>
Exact BookStack Version
v21.08.5
Log Content
/var/log/apache2/error.log
Details
]
[Wed Apr 17 00:00:54.647466 2024] [mpm_prefork:notice] [pid 1729464] AH00171: Graceful restart requested, doing restart
[Wed Apr 17 00:00:54.782774 2024] [mpm_prefork:notice] [pid 1729464] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 00:00:54.782799 2024] [core:notice] [pid 1729464] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 17 09:10:08.296152 2024] [mpm_prefork:notice] [pid 1729464] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Apr 17 09:10:08.581245 2024] [mpm_prefork:notice] [pid 2136955] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 09:10:08.581392 2024] [core:notice] [pid 2136955] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 17 09:13:33.422805 2024] [mpm_prefork:notice] [pid 2136955] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Apr 17 09:13:33.640765 2024] [mpm_prefork:notice] [pid 2207742] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 09:13:33.640905 2024] [core:notice] [pid 2207742] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 17 09:22:37.491604 2024] [mpm_prefork:notice] [pid 2207742] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Apr 17 09:22:37.724395 2024] [mpm_prefork:notice] [pid 2394356] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 09:22:37.724501 2024] [core:notice] [pid 2394356] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 17 09:43:45.665999 2024] [mpm_prefork:notice] [pid 2394356] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Apr 17 09:43:45.853626 2024] [mpm_prefork:notice] [pid 2830832] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 09:43:45.853739 2024] [core:notice] [pid 2830832] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 17 09:44:43.284848 2024] [mpm_prefork:notice] [pid 2830832] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Apr 17 09:44:43.447393 2024] [mpm_prefork:notice] [pid 2851027] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 09:44:43.447473 2024] [core:notice] [pid 2851027] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 17 09:45:42.230014 2024] [mpm_prefork:notice] [pid 2851027] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Apr 17 09:45:42.414491 2024] [mpm_prefork:notice] [pid 2871714] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 09:45:42.414604 2024] [core:notice] [pid 2871714] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 17 09:46:33.666394 2024] [mpm_prefork:notice] [pid 2871714] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Apr 17 09:46:33.848068 2024] [mpm_prefork:notice] [pid 2889953] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 09:46:33.848178 2024] [core:notice] [pid 2889953] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 17 09:47:55.441100 2024] [mpm_prefork:notice] [pid 2889953] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Apr 17 09:47:55.629981 2024] [mpm_prefork:notice] [pid 2917238] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 09:47:55.630056 2024] [core:notice] [pid 2917238] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 17 09:49:28.431980 2024] [mpm_prefork:notice] [pid 2917238] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Apr 17 09:49:28.662563 2024] [mpm_prefork:notice] [pid 2951551] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 09:49:28.662686 2024] [core:notice] [pid 2951551] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 17 09:50:15.280754 2024] [mpm_prefork:notice] [pid 2951551] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Apr 17 09:50:15.537658 2024] [mpm_prefork:notice] [pid 2965891] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 09:50:15.537763 2024] [core:notice] [pid 2965891] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 17 09:51:33.143373 2024] [mpm_prefork:notice] [pid 2965891] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Apr 17 09:51:33.386847 2024] [mpm_prefork:notice] [pid 2993687] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Wed Apr 17 09:51:33.386985 2024] [core:notice] [pid 2993687] AH00094: Command line: '/usr/sbin/apache2'
Hosting Environment
root@Virtual-Web:/var/log/apache2# uname -a Linux Virtual-Web 5.10.0-22-amd64 #1 SMP Debian 5.10.178-3 (2023-04-22) x86_64 GNU/Linux root@Virtual-Web:/var/log/apache2#
root@Virtual-Web:/var/log/apache2# cat /etc/debian_version 11.7 root@Virtual-Web:/var/log/apache2#
i php-common 2:69 all Common files for PHP packages ii php-ldap 2:7.4+76 all LDAP module for PHP [default]
Hi @Enigma7291,
- Try removing the
<IfModule mod_ssl.c>and</IfModule>lines from your config. - Where does the shown SSL config exist? Are you sure it's being used?
- If you watch the apache access log do you see lines logged when attempting to access over https?
As an additional note, I see you've installed to /var/www/html/BookStack. The /var/www/html is commonly a default served web path. It's important to ensure you don't have the BookStack installation within another live site being served.
Also, it's generally better to prevent use of htaccess files and instead define the required apache config within the virtual host as reflected here (Not, you'd need to change paths to suit.).
Hi! thanx the advice!
I delete the records:<IfModule mod_ssl.c> </IfModule> I delete the default site simlink from the enabled sites. Now just bookstack is over there. After I restart Apache the status as before
SSL logs: 10.10.1.20 - - [18/Apr/2024:09:04:21 +0200] "GET /user_avatar.png HTTP/1.1" 200 8245 "https://xyz.example.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0" 10.10.1.20 - - [18/Apr/2024:09:04:21 +0200] "GET /dist/print-styles.css?version=v21.08.5 HTTP/1.1" 200 715 "https://xyz.example.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0" 10.10.1.20 - - [18/Apr/2024:09:04:21 +0200] "GET /dist/app.js?version=v21.08.5 HTTP/1.1" 200 257390 "https://xyz.example.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0" 10.10.1.20 - - [18/Apr/2024:09:04:28 +0200] "GET /uploads/images/system/2024-02/xyz.example.png HTTP/1.1" 200 3794 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0"
@Enigma7291 Please can you update the SSL config to include the required rewrites, as per our example here. You'll need to change paths to suit your setup. Restart apache afterwards.
Hi! thanx the advice!
I changed the SSL config as below, but same status. /etc/apache2/sites-available/Wiki_SSL.conf [----] 16 L:[ 1+41 42/ 43] (1202/1217b) 0010 0x00A [][X]
<VirtualHost _default_:443>
ServerName xyz.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/BookStack/public/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/wiki_2024-25.crt
SSLCertificateKeyFile /etc/ssl/private/wiki_2024-25.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /var/www/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>
</VirtualHost>
Hi @Enigma7291,
The <Directory /var/www/html/bookstack/public/> does not match the /var/www/html/BookStack/public/ path you report to be using (note the capitals in BookStack). Try changing that. Also, I assume the funk <------> parts aren't visible in your config? Not sure where those are coming from.
I just ran into this exact same issue. I followed the conversation here. I added two things to my ssl.conf
- DocumentRoot /with/correct/path/to/public
- <Directory /with/correct/path/to/public>
Using the example you linked. My 404s sprang back to life and all appears to be well in the universe. Thanks for your support. I hope the OP is able to have as much success too!
Good to hear that helped @A9G-Data-Droid!
Since there hasn't been a follow up from the original thread author for some time, I'll go ahead and close this off