Blank Page after LDAP added to .env #2000

Closed
opened 2026-02-05 02:26:18 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @mcbmoreno on GitHub (Jan 2, 2021).

Hello,
Running Bookstack version 0.30.2

I am trying to set up LDAP on our Bookstack server.

I ran this to create the .env file in /var/www/bookstack dir
cp .env.example .env

With vim I added the following to the /var/www/bookstack/.env file
AUTH_METHOD=ldap
LDAP_SERVER=dc.domain.com:389
LDAP_BASE_DN=OU=Domain_Users,DC=domain,DC=local
LDAP_DN=CN=Admin, Bookstack,OU=it_Staff,OU=Domain_Users,DC=domain,DC=local
LDAP_PASS=Password
LDAP_USER_FILTER=(&(sAMAccountName=${user}))
LDAP_VERSION=3
LDAP_ID_ATTRIBUTE=BIN;objectGUID
LDAP_EMAIL_ATTRIBUTE=mail
LDAP_DISPLAY_NAME_ATTRIBUTE=cn

After I make the above additions to the .env file Bookstack does not load. A blank white page is displayed. No Bookstack or browser based error messages, just a blank white page.

I tried restarting the apache2 service and restarted the server but neither did anything to help.

Before the .env file was edited Bookstack loaded fine and I was able to login with the local admin.

Any ideas?

Thanks.

Originally created by @mcbmoreno on GitHub (Jan 2, 2021). Hello, Running Bookstack version 0.30.2 I am trying to set up LDAP on our Bookstack server. I ran this to create the .env file in /var/www/bookstack dir cp .env.example .env With vim I added the following to the /var/www/bookstack/.env file AUTH_METHOD=ldap LDAP_SERVER=dc.domain.com:389 LDAP_BASE_DN=OU=Domain_Users,DC=domain,DC=local LDAP_DN=CN=Admin\, Bookstack,OU=it_Staff,OU=Domain_Users,DC=domain,DC=local LDAP_PASS=Password LDAP_USER_FILTER=(&(sAMAccountName=${user})) LDAP_VERSION=3 LDAP_ID_ATTRIBUTE=BIN;objectGUID LDAP_EMAIL_ATTRIBUTE=mail LDAP_DISPLAY_NAME_ATTRIBUTE=cn After I make the above additions to the .env file Bookstack does not load. A blank white page is displayed. No Bookstack or browser based error messages, just a blank white page. I tried restarting the apache2 service and restarted the server but neither did anything to help. Before the .env file was edited Bookstack loaded fine and I was able to login with the local admin. Any ideas? Thanks.
OVERLORD added the 🐕 Support label 2026-02-05 02:26:18 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 2, 2021):

Hi @mcbmoreno,
If any of the values within the .env contain spaces (Possible DN) or hashes ensure they're wrapped in quotes. For example:

LDAP_PASS="donkey cat"

That would be my first guess, otherwise a blank white page can commonly indicate folder permission issues on those that need to be writeable by the web server.

@ssddanbrown commented on GitHub (Jan 2, 2021): Hi @mcbmoreno, If any of the values within the `.env` contain spaces (Possible DN) or hashes ensure they're wrapped in quotes. For example: ```shell LDAP_PASS="donkey cat" ``` That would be my first guess, otherwise a blank white page can commonly indicate folder permission issues on those that need to be writeable by the web server.
Author
Owner

@mcbmoreno commented on GitHub (Jan 3, 2021):

Thanks ssddanbrown.

That was it. my LDAP_DN was LDAP_DN=CN=Admin, Bookstack,OU=it_Staff,OU=Domain_Users,DC=domain,DC=local

put quotes around it and escaped the backslash with another backslash like below and worked like a charm.
"LDAP_DN=CN=Admin\, Bookstack,OU=it_Staff,OU=Domain_Users,DC=domain,DC=local"

Thanks again.

@mcbmoreno commented on GitHub (Jan 3, 2021): Thanks ssddanbrown. That was it. my LDAP_DN was LDAP_DN=CN=Admin\, Bookstack,OU=it_Staff,OU=Domain_Users,DC=domain,DC=local put quotes around it and escaped the backslash with another backslash like below and worked like a charm. "LDAP_DN=CN=Admin\\, Bookstack,OU=it_Staff,OU=Domain_Users,DC=domain,DC=local" Thanks again.
Author
Owner

@ssddanbrown commented on GitHub (Jan 3, 2021):

@mcbmoreno Great news! I'll therefore close off the issue.

@ssddanbrown commented on GitHub (Jan 3, 2021): @mcbmoreno Great news! I'll therefore close off the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2000