How to use certbot to redirect bookstack form 80 to 443? #1172

Closed
opened 2026-02-05 00:08:57 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @donaldzou on GitHub (May 7, 2019).

Hi, now I have http and https both enabled, but I want to force bookstack only 443. What should i do?

Originally created by @donaldzou on GitHub (May 7, 2019). Hi, now I have http and https both enabled, but I want to force bookstack only 443. What should i do?
OVERLORD added the 🐕 Support Question labels 2026-02-05 00:08:57 +03:00
Author
Owner

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

Hi @donaldzou, Your question is more of a webserver administration question that an question specific to BookStack.

It will depend on what operating system, webserver software and how you've set-up HTTPS. If you provide those details then we may be able to provide more support.

If you used letsencrypt, via certbot, it usually gives you the choice to redirect HTTP traffic.

You could set the APP_URL parameter in your .env file you start with https:// but that won't force all requests to be https, only links generated by BookStack.

@ssddanbrown commented on GitHub (May 8, 2019): Hi @donaldzou, Your question is more of a webserver administration question that an question specific to BookStack. It will depend on what operating system, webserver software and how you've set-up HTTPS. If you provide those details then we may be able to provide more support. If you used letsencrypt, via certbot, it usually gives you the choice to redirect HTTP traffic. You could set the `APP_URL` parameter in your `.env` file you start with `https://` but that won't force all requests to be https, only links generated by BookStack.
Author
Owner

@Mant1kor commented on GitHub (May 8, 2019):

@donaldzou It depends on the web server you use.

@Mant1kor commented on GitHub (May 8, 2019): @donaldzou It depends on the web server you use.
Author
Owner

@lithium-ap commented on GitHub (May 23, 2019):

Hi, now I have http and https both enabled, but I want to force bookstack only 443. What should i do?

Hi, if you are using apache with certbot installed via apt or yum you it should ask you if you want it to create the redirects during the final part of the cert generation. If not you will need to add a redirect to your virtualhost config or through .htaccess and rewrite module. This article is pretty straightforward.

Like I mentioned tho... the final step in certbot asks you if you want certbot to create the redirect for you (with both Apache and Nginx will do)

@lithium-ap commented on GitHub (May 23, 2019): > Hi, now I have http and https both enabled, but I want to force bookstack only 443. What should i do? Hi, if you are using apache with certbot installed via apt or yum you it should ask you if you want it to create the redirects during the final part of the cert generation. If not you will need to add a redirect to your virtualhost config or through .htaccess and rewrite module. This [article ](https://www.tecmint.com/redirect-http-to-https-on-apache/)is pretty straightforward. Like I mentioned tho... the final step in certbot asks you if you want certbot to create the redirect for you (with both Apache and Nginx will do)
Author
Owner

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

Thanks for the above responses.

Since the original issue creator has not responded, and since some useful information has been provided, I'll close this. If you continue to have problems feel free to open a new issue.

@ssddanbrown commented on GitHub (May 25, 2019): Thanks for the above responses. Since the original issue creator has not responded, and since some useful information has been provided, I'll close this. If you continue to have problems feel free to open a new issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1172