diff --git a/plinth/modules/config/tests/config.feature b/plinth/modules/config/tests/config.feature index eb90d751c..c18103011 100644 --- a/plinth/modules/config/tests/config.feature +++ b/plinth/modules/config/tests/config.feature @@ -15,6 +15,10 @@ Scenario: Change domain name When I change the domain name to mydomain.example Then the domain name should be mydomain.example +Scenario: Capitalized domain name + When I change the domain name to Mydomain.example + Then the domain name should be mydomain.example + Scenario: Change webserver home page Given the syncthing application is installed And the syncthing application is enabled diff --git a/plinth/modules/config/views.py b/plinth/modules/config/views.py index abc89095b..a88a6cde2 100644 --- a/plinth/modules/config/views.py +++ b/plinth/modules/config/views.py @@ -120,6 +120,10 @@ def set_domainname(domainname, old_domainname): # Domain name should be ASCII. If it's unicode, convert to ASCII. domainname = str(domainname) + # Domain name is not case sensitive, but Let's Encrypt certificate + # paths use lower-case domain name. + domainname = domainname.lower() + LOGGER.info('Changing domain name to - %s', domainname) actions.superuser_run('domainname-change', [domainname])