Behavior of Unavailable Domains not working properly [SOLVED]
Behavior of Unavailable Domains not working properly [SOLVED]
Hi,
I'm having a bit of a problem with the "Behavior of Unavailable Domains" configuration.
Server operating system + version
Debian 11
KeyHelp version + build number
23.0 - Build 2921
Problem description / error messages
When navigating to a domain that is not setup in KeyHelp it sends the me to the dashboard login rather than to the "Non-existent domains" setting that I have set in Configuration -> Behavior of Unavailable Domains.
When navigating to a domain that is disabled in KeyHelp it displays "404 Not Found. The requested URL was not found on this server." even though I have tried both to leave it at the default setting and also set a custom URL.
Expected result
Non-existent domain page should be displayed.
Disabled domains should be directed correctly.
Actual result
Non-existent domains: Redirects to control panel login no matter what I set it to in the configuration.
Disabled domains: 404 error no matter its setting.
Additional information
No additional Debian packages installed on the server, this is a fresh install.
I'm having a bit of a problem with the "Behavior of Unavailable Domains" configuration.
Server operating system + version
Debian 11
KeyHelp version + build number
23.0 - Build 2921
Problem description / error messages
When navigating to a domain that is not setup in KeyHelp it sends the me to the dashboard login rather than to the "Non-existent domains" setting that I have set in Configuration -> Behavior of Unavailable Domains.
When navigating to a domain that is disabled in KeyHelp it displays "404 Not Found. The requested URL was not found on this server." even though I have tried both to leave it at the default setting and also set a custom URL.
Expected result
Non-existent domain page should be displayed.
Disabled domains should be directed correctly.
Actual result
Non-existent domains: Redirects to control panel login no matter what I set it to in the configuration.
Disabled domains: 404 error no matter its setting.
Additional information
No additional Debian packages installed on the server, this is a fresh install.
Re: Behavior of Unavailable Domains not working properly
As long as the domain is not yet configured in KeyHelp the normal behaviour is the loginscreen.
This allows you to login to the panel even if the hostname has changed or in case of IP change.
I would say this is a feature and not a bug.
This allows you to login to the panel even if the hostname has changed or in case of IP change.
I would say this is a feature and not a bug.
Gruß,
Tobi
-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
Tobi
-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
Re: Behavior of Unavailable Domains not working properly
Thanks for the response!
What would you say the purpose of "Behavior of Unavailable Domains" configuration is if not what I expected it to be? What domains are affected by this configuration?
What would you say the purpose of "Behavior of Unavailable Domains" configuration is if not what I expected it to be? What domains are affected by this configuration?
Re: Behavior of Unavailable Domains not working properly
I can reproduce the issue. Thou i am unsure, why it worked back in the days, when i implemented it.
I have now made several changes to the /etc/apache/keyhelp/keyhelp.conf and this should work for all cases now. I would love to see some feedback on those by the community, to double check that everything is working now and no regression has sneaked into. Than it will be implemented for the upcoming update.
So if anybody will give this new settings a try, that would be awesome.
1) Open /etc/apache/keyhelp/keyhelp.conf
2) Find
and change this to the following. Replace IP_1 IP_2 (etc...) with your IPs of the server.
3) Find
and change this to the following. Replace IP_1 IP_2 (etc...) with your IPs of the server.
4) Find
and change this to the following.
5) Find
I have now made several changes to the /etc/apache/keyhelp/keyhelp.conf and this should work for all cases now. I would love to see some feedback on those by the community, to double check that everything is working now and no regression has sneaked into. Than it will be implemented for the upcoming update.
So if anybody will give this new settings a try, that would be awesome.
1) Open /etc/apache/keyhelp/keyhelp.conf
2) Find
Code: Select all
# KeyHelp / Tools
<VirtualHost *:443>
ServerName YOUR_HOSTNAME
ServerAdmin YOUR_EMAIL
Code: Select all
# KeyHelp / Tools
<VirtualHost *:443>
ServerName YOUR_HOSTNAME
ServerAlias IP_1 IP_2
ServerAdmin YOUR_EMAIL
3) Find
Code: Select all
# Redirect HTTP -> HTTPS
<VirtualHost *:80>
ServerName YOUR_HOSTNAME
Code: Select all
# KeyHelp / Tools
<VirtualHost *:80>
ServerName YOUR_HOSTNAME
ServerAlias IP_1 IP_2
4) Find
Code: Select all
# Default page, if domain not available.
<VirtualHost *:443>
ServerName YOUR_HOSTNAME
ServerAlias *.YOUR_HOSTNAME
Code: Select all
# Default page, if domain not available.
<VirtualHost *:443>
ServerName YOUR_HOSTNAME
ServerAlias *
5) Find
Code: Select all
# Default page, if domain not available.
<VirtualHost *:80>
ServerName YOUR_HOSTNAME
ServerAlias *.YOUR_HOSTNAME
Code: Select all
# Default page | Redirect HTTP -> HTTPS
<VirtualHost *:80>
ServerName YOUR_HOSTNAME
ServerAlias *
Mit freundlichen Grüßen / Best regards
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Re: Behavior of Unavailable Domains not working properly
It works!
All though every time I make any changes from the dashboard, the "ServerAlias" sets back to "*.hostname" rather than just leaving it at "*".
When I try xyz.hostname it redirects correctly as a non-existent/disabled domain.
I guess you found the bug/issue: When "ServerAlias *.hostname" is set it only affects non-existent/disabled SUBdomains for the actual hostname rather than all non-existent/disabled domains.
Fix: Set ServerAlias to "*" by default.
All though every time I make any changes from the dashboard, the "ServerAlias" sets back to "*.hostname" rather than just leaving it at "*".
When I try xyz.hostname it redirects correctly as a non-existent/disabled domain.
I guess you found the bug/issue: When "ServerAlias *.hostname" is set it only affects non-existent/disabled SUBdomains for the actual hostname rather than all non-existent/disabled domains.
Fix: Set ServerAlias to "*" by default.
Re: Behavior of Unavailable Domains not working properly
Thank you for the feedback (other feedback by other users is still welcome).
You may want to temporary set this file immutable ("chattr + i /etc/apache/keyhelp/keyhelp.conf"), until KeyHelp 23.1 is released.Grts wrote:All though every time I make any changes from the dashboard, the "ServerAlias" sets back to "*.hostname" rather than just leaving it at "*".
Mit freundlichen Grüßen / Best regards
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Re: Behavior of Unavailable Domains not working properly
Stumbled across Apache server status will not work with these changes.
So the following is also required in the keyhelp.conf (put it before "# User vhosts")
So the following is also required in the keyhelp.conf (put it before "# User vhosts")
Code: Select all
# Apache server status
<VirtualHost *:443>
ServerName localhost
</VirtualHost>
Mit freundlichen Grüßen / Best regards
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************