Once deployment is complete, accessing http://iP:80 will redirect to https://example.com. #4908

Closed
opened 2026-02-05 09:25:30 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @o-zero-o on GitHub (Aug 12, 2024).

Describe the Bug

After following the manual installation guide for BookStack and completing the deployment, accessing http://ip:80 redirects to https://example.com. My Apache configuration is as follows:

ServerRoot "/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
<Directory />
    AllowOverride none
    Require all denied
</Directory>
DocumentRoot "/app/BookStack/public"
<Directory "/app/BookStack/public">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>
<Files ".ht*">
    Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>
<IfModule mime_module>
    TypesConfig /etc/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
    MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf

image
The following are the steps to reproduce the issue:
recording

Steps to Reproduce

None

Expected Behaviour

None

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v24.05.3

Originally created by @o-zero-o on GitHub (Aug 12, 2024). ### Describe the Bug After following the manual installation guide for BookStack and completing the deployment, accessing http://ip:80 redirects to https://example.com. My Apache configuration is as follows: ``` ServerRoot "/etc/httpd" Listen 80 Include conf.modules.d/*.conf User apache Group apache ServerAdmin root@localhost <Directory /> AllowOverride none Require all denied </Directory> DocumentRoot "/app/BookStack/public" <Directory "/app/BookStack/public"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> <IfModule dir_module> DirectoryIndex index.html </IfModule> <Files ".ht*"> Require all denied </Files> ErrorLog "logs/error_log" LogLevel warn <IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> CustomLog "logs/access_log" combined </IfModule> <IfModule alias_module> ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" </IfModule> <Directory "/var/www/cgi-bin"> AllowOverride None Options None Require all granted </Directory> <IfModule mime_module> TypesConfig /etc/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType text/html .shtml AddOutputFilter INCLUDES .shtml </IfModule> AddDefaultCharset UTF-8 <IfModule mime_magic_module> MIMEMagicFile conf/magic </IfModule> EnableSendfile on IncludeOptional conf.d/*.conf ``` ![image](https://github.com/user-attachments/assets/6cf24330-c6da-49eb-85ab-4cca2744493e) The following are the steps to reproduce the issue: ![recording](https://github.com/user-attachments/assets/8b740195-3fcb-4944-836f-f51633255c4e) ### Steps to Reproduce None ### Expected Behaviour None ### Screenshots or Additional Context _No response_ ### Browser Details _No response_ ### Exact BookStack Version v24.05.3
OVERLORD added the 🐛 Bug label 2026-02-05 09:25:30 +03:00
Author
Owner

@Zverik commented on GitHub (Aug 12, 2024):

Did you set the APP_URL key in the .env file?

@Zverik commented on GitHub (Aug 12, 2024): Did you set the `APP_URL` key in the `.env` file?
Author
Owner

@o-zero-o commented on GitHub (Aug 13, 2024):

Did you set the APP_URL key in the .env file?

Thank you; that's exactly the reason.

@o-zero-o commented on GitHub (Aug 13, 2024): > Did you set the `APP_URL` key in the `.env` file? Thank you; that's exactly the reason.
Author
Owner

@ssddanbrown commented on GitHub (Aug 13, 2024):

Thanks @Zverik for providing the solution.
Now the cause has been found I'll go ahead and close this off.

@ssddanbrown commented on GitHub (Aug 13, 2024): Thanks @Zverik for providing the solution. Now the cause has been found I'll go ahead and close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4908