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.
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
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.
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
This is still not fixed: http://srv012.web.ichtushosting.com --> /var/www/html/ (using *) https://srv012.web.ichtushosting.com --> /var/www/srv012.web.ichtushosting.com/web/
Correct, that's the way apache works and that's why you always use something like server1.yourdomain.tld as hostname and not a domain name / subdomain that shall be used to host a website. So there is nothing to be fixed except that you might have used a wrong hostname if that hostname shall be used for a website, in that case, change the server hostname.
aha, never in my life had that ;-). I added the srv012.web.ichtushosting.com website to get an easy way to get let's encrypt certs for that hostname . Is there a better way to get let's encrypt certificates?
Depends on what you mean by better... for the acme.sh client I added DNS-01 for ISPC 3.1 so that I can create certs basically on any machine. It will be authenticated by adding a TXT record to the DNS zone of that domain.