Can't configure a VHOST template

#1
Hello,

I'm trying to set up 2 https domains (website_1.com & website_2.com) with OLS templates VHOST. I have 1 certificate (CERTBOT - LETSENCRYPT) for each domain.
I made many tests and I don't understand what I'm doing wrong...

This is my configuration :
OpenLiteSpeed 1.6.19 / DEBIAN 10 (updated).

In /usr/local/lsws/conf/templates/centralConfig.conf :
Code:
virtualHostConfig {
    docRoot                 /var/mon-vps/php/$VH_NAME/www
    enableGzip              1
    enableIpGeo             1
    cgroups                 0

    vhssl  {
        keyFile               /etc/letsencrypt/live/$VH_NAME/privkey.pem
        certFile              /etc/letsencrypt/live/$VH_NAME/fullchain.pem
        certChain             1

        OR
        Private Key File : /etc/letsencrypt/live/$VH_DOMAIN/privkey.pem
        Certificate File : /etc/letsencrypt/live/$VH_DOMAIN/fullchain.pem

        OR :
        Private Key File : /etc/letsencrypt/live/website_1.com/privkey.pem
        Certificate File : /etc/letsencrypt/live/website_1.com/fullchain.pem

    }
}

In : /usr/local/lsws/conf/httpd_config.conf
Code:
listener http {
  address                 *:80
  secure                  0
}

listener https {
  address                 *:443
  secure                  1
}

vhTemplate centralConfigTonio {
  templateFile            $SERVER_ROOT/conf/templates/centralConfig.conf
  listeners               http, https
  member website_1.com
  member website_2.com
}


But if I delete the SSL Section in "VHost Templates" and complete directly in the Listeners Section, it works ! :

Listener https > SSL :
SSL Private Key & Certificate :

Private Key File : /etc/letsencrypt/live/website_1.com/privkey.pem
Certificate File : /etc/letsencrypt/live/website_1.com/fullchain.pem
Chained Certificate : Yes
==> https://www.website_1.com works !


OR in the same listener, if I make this replacement :

Private Key File : /etc/letsencrypt/live/website_2.com/privkey.pem
Certificate File : /etc/letsencrypt/live/website_2.com/fullchain.pem
Chained Certificate : Yes
==> https://www.website_2.com works !



Thanks fore reading ;-)

Does VHOST template work on your side ?
Do you know what is my problem ?
Could you share your config ?

Any help appreciated...
 
Last edited:

ATK

New Member
#2
Same problem...., Ssl works only if i set ssl in listener section but i have 3 different domain and have generated Key for each domain... , If i set Key in ssl section of virtual host NOT WORKS...YOU Have solved???
 

ATK

New Member
#4
in fact I had read about the override I filled the ssl fields of the listener with the keys of 1 domain but unfortunately only the one indicated in the listener works...-:(
 
Top