http does not load correct webdir

Discussion in 'Installation/Configuration' started by Rein van 't Veer, Oct 11, 2016.

  1. Hey,

    I've come upon a strange issue:
    I'm using let's encrypt for all my certs but when going to the servername of my servers on http I get the default apache webroot instead.
    see:
    http://srv013.web.ichtushosting.com --> default apache webroot
    https://srv013.web.ichtushosting.com --> correct webroot (made website with this hostname + enabled lets encrypt)

    It does not seem to happen for other websites that are running on the same server.

    I have checked the vhost file an nothing out of the ordinary shows up.

    Pastebin vhost file: http://pastebin.com/ZKG7MH3Z

    Error log of apache (after turning on debugging)
    http:
    Code:
    ==> error.log <==
    [Tue Oct 11 22:08:02.318022 2016] [authz_core:debug] [pid 10378] mod_authz_core.c(809): [client 2a01:4f8:c17:aac:8000::1002:58511] AH01626: authorization result of Require all granted: granted, referer: http://srv008.web.ichtushosting.com/
    [Tue Oct 11 22:08:02.318248 2016] [authz_core:debug] [pid 10378] mod_authz_core.c(809): [client 2a01:4f8:c17:aac:8000::1002:58511] AH01626: authorization result of <RequireAny>: granted, referer: http://srv008.web.ichtushosting.com/
    
    ==> access.log <==
    2a01:4f8:c17:aac:8000::1002 - - [11/Oct/2016:22:08:02 +0200] "GET /icons/openlogo-75.png HTTP/1.1" 304 165 "http://srv008.web.ichtushosting.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"
    
    https:
    Code:
    ==> error.log <==
    [Tue Oct 11 22:05:07.944800 2016] [proxy:debug] [pid 13957] proxy_util.c(1771): AH00925: initializing worker proxy:reverse shared
    [Tue Oct 11 22:05:07.945083 2016] [proxy:debug] [pid 13957] proxy_util.c(1813): AH00927: initializing worker proxy:reverse local
    [Tue Oct 11 22:05:07.945263 2016] [proxy:debug] [pid 13957] proxy_util.c(1864): AH00931: initialized single connection worker in child 13957 for (*)
    
    ==> other_vhosts_access.log <==
    srv008.web.ichtushosting.com:443 2a01:4f8:c17:aac:8000::1002 - - [11/Oct/2016:22:05:08 +0200] "GET / HTTP/1.1" 200 5543 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"
    srv008.web.ichtushosting.com:443 2a01:4f8:c17:aac:8000::1002 - - [11/Oct/2016:22:05:08 +0200] "GET /favicon.ico HTTP/1.1" 200 7701 "https://srv008.web.ichtushosting.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"
    
    ISPConfig 3.1 final is being used.
     
  2. Jesse Norell

    Jesse Norell Active Member

    See if you have a different website set to the ip address, rather than '*'.
     
  3. all are loaded with *:80, no exceptions

    Tested with a test domain first no ssl enabled, enabling ssl (lets encrypt) and checking apache vhost diff's but no problems arise. only with the url where the serverhostname = vhost
     
  4. Even without ssl enabled the webroot is not being loaded... this is odd... no other http sites have this problem (same server) issue happens on all my servers.
     
  5. Just tested changing the hostname of the server: correct webroot is being loaded!
    So:
    • when the server hostname = hostname in apache vhost + port 80 ==> webroot is default webroot
    • when server hostname != hostname in apache vhost ==> correct webroot
     

Share This Page