Vhost for subdomain keeps using SSL from main domain vhost

#1
I've seen multiple reports on this, and there could very well be something wrong in my setup, but I can't figure it out. I've got these two vhosts, one for the main site:
Code:
docRoot                   $VH_ROOT
vhDomain                  domain.com
vhAliases                 www.domain.com
adminEmails               info@domain.com
enableGzip                1

errorlog logs/www_error.log {
  useServer               0
  logLevel                ERROR
  keepDays                1
  compressArchive         0
}

rewrite  {
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
}

vhssl  {
  keyFile                 /etc/letsencrypt/live/domain.com/privkey.pem
  certFile                /etc/letsencrypt/live/domain.com/fullchain.pem
  certChain               1
}
The SSL listener is connected to this vhost, and listens to `www.domain.com` for it. Then, I have a second domain:
Code:
docRoot                   $VH_ROOT
vhDomain                  webmail.domain.com

errorlog /usr/local/lsws/logs/webmail.log {
  useServer               0
  logLevel                DEBUG
}

scripthandler  {
  add                     lsapi:LSPHP81-PEAR php
}

extprocessor LSPHP81-PEAR {
  type                    lsapi
  address                 uds://tmp/lshttpd/lsphp81-pear.sock
  maxConns                35
  initTimeout             60
  retryTimeout            60
  respBuffer              0
  autoStart               2
  path                    /usr/local/lsws/lsphp81/bin/lsphp
}

rewrite  {
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
}

vhssl  {
  keyFile                 /etc/letsencrypt/live/webmail.domain.com/privkey.pem
  certFile                /etc/letsencrypt/live/webmail.domain.com/fullchain.pem
  certChain               1
}
Which has `/home/roundcube/roundcubemail-1.6.6`, setting up roundcube as the webmail-subdomain under the main domain. Whatever I try (I've even removed the SSL from the listener), the webmail vhost keeps serving the certificate from the main vhost. I can't figure it out.
 

Cold-Egg

Administrator
#2
If the webmail.domain.com you configured in vhssl is valid, it should override the SSL at the listener level. What you've set is correct. If you don't see any errors or warnings in the error log, feel free to inbox me or submit the issue to support@litespeedtech.com for further assistance.
 
#3
Thanks for your efforts. Turned out Apache was also still installed on this server. The service was stopped, but because the server was restarted, the service automatically restarted, throwing off ports 80 and 443.
 
Top