Einen Überblick über das Administrationstool KeyHelp der Keyweb AG und dessen Download gibt es auf https://www.keyhelp.de

Dieses Forum soll es interessierten Benutzern ermöglichen, sich über KeyHelp auszutauschen und Hilfe bei Problemen zu finden.

DocumentRoot does not change for HTTPS site

You found a bug? Please tell us about.
Antworten
Benutzeravatar
sburina
Beiträge: 11
Registriert: Di 19. Jun 2018, 00:25

DocumentRoot does not change for HTTPS site

Beitrag von sburina » Fr 24. Aug 2018, 20:00

Hi!

I tried to configure a different DocumentRoot for a site, adding ./public/ directory within the existing www, by using the "Folder explorer". After the change has been submitted, the DocumentRoot directive changes in the apache configuration, but only for the HTTP (first VirtualHost), and within the second VirtualHost (port 443) the DocumentRoot pathis left unchanged. If changed manually, it reverts to the wrong value after any intervention on that config via the web interface.

Thank you in advance!
Benutzeravatar
Alexander
Keyweb AG
Beiträge: 1267
Registriert: Mi 20. Jan 2016, 02:23

Re: DocumentRoot does not change for HTTPS site

Beitrag von Alexander » Mo 3. Sep 2018, 10:11

Hello,

you write first "VirtualHost" and "second VirtualHost" - Because of this hint i came up with the following explanation, KeyHelp is working correctly in this case, but you may not be aware of the settings you made.


When you have a Domain example.com and a subdomain www.example.com. Both will have their own vhost container with their own path. And they exist for HTTP and HTTPS (if available). Because of this, you can let example.com point to "directory_a" and www.example.com to "directory_b".

When opening the apache config file for this particular user, the order would always be HTTPS container -> HTTP container.

I guess the following happen in you example:
You have a not SSL protected example.com and a SSL protected www.example.com. And you only changed the path for www.example.com,, and not also for example.com

The order inside of the config file would look like this:

Code: Alles auswählen

<VirtualHost *:80>
  ServerName example.com
  DocumentRoot "/home/users/<USERNAME>/www/"
  ...
</VirtualHost>  

<VirtualHost *:433>
  ServerName www.example.com
  DocumentRoot "/home/users/<USERNAME>/www/public/"
  ...
</VirtualHost>  

<VirtualHost *:80>
  ServerName www.example.com
  DocumentRoot "/home/users/<USERNAME>/www/public/"
  ...
</VirtualHost>  

Solution A)
Lets example.com also point to the "/public/" directory, like www.example.com

Solution B)
When you only want to use www.example.com, let example.com point directly to www.example.com with a redirect. Just input "https://www.example.com" into the "Target" input field inside of the settings of example.com
This is the better approach concerning SEO.

----

If this does not help you, it may be a bug, please supply your apache config file of this user in this post or via PM.
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
**************************************************************
majorboobage
Beiträge: 31
Registriert: Do 26. Jul 2018, 08:51

Re: DocumentRoot does not change for HTTPS site

Beitrag von majorboobage » Mi 12. Sep 2018, 14:02

Talking about ssl, keyhelp.de doesn't have cert
Bild
v3ng
Beiträge: 161
Registriert: Mi 4. Jul 2018, 18:08

Re: DocumentRoot does not change for HTTPS site

Beitrag von v3ng » Fr 12. Okt 2018, 16:18

majorboobage hat geschrieben:
Mi 12. Sep 2018, 14:02
Talking about ssl, keyhelp.de doesn't have cert
Bild
No problems here.
Bild
Benutzeravatar
Alexander
Keyweb AG
Beiträge: 1267
Registriert: Mi 20. Jan 2016, 02:23

Re: DocumentRoot does not change for HTTPS site

Beitrag von Alexander » Di 16. Okt 2018, 09:50

Thanks for bringing this up @majorboobage
And thanks for the reminder @v3ng (I hadn't been thinking about it any more :oops: )

Majorboobage was right, there was a misconfiguration when calling https://keyhelp.de / https://keyhelp.eu (without www).
This is now fixed.
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
**************************************************************
Antworten

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 3 Gäste