Is it possible to setup LetsEncrypt SSL for created subdomain? Second thing - I have error when try create database user. Is it possible to make it longer?
I think it will be automated if main website is LE enabled. Otherwise you may use subdomain (vhost) for individual LE ssl certs.
As @ahrasis pointed out, sub and alias domains of a website get added automatically to the LE cert of the website.
Main website (let's say domain.com) has LE enabled and works properly with redirect from http to https. I created subdomain (let's say testh.domain.com) which will be on nodejs. Main directory of subdomain is /web/testh (/web/ is default public directory of main domain). There is application based on nodejs which use some port, default 3000. http://testh.domain.com redirect automatically to https:// and it is like with main domain. But when I put in address bar https://testh.domain.com:3000 (without https it works) green padlock changes to exclamation mark and I got message that browser can't open it with error ERR_CONNECTION_CLOSED (on Chrome) or that browser can't form secure connection (on Firefox). I think if I would setup LE for subdomain or use vhost (still not visible vhost option for alias and subdomains in ISP panel) I could open https://testh.domain.com:3000 without any problem. Moreover I could - for vhost option - easily setup ProxyPass which would hide nodejs port in URL, which is visible by default. PS Attached screen shows which options I have available in Sites tab. Second thing that after subdomain creation using option "Subdomain for website" I have line in main domain vhost file 100-domain.com.vhost, for *80 and *443: Code: ServerName domain.com #it was by default ServerAlias www.domain.com #it was by default ServerAlias testh.domain.com #added automatically after create subdomain And what exactly are differences between subdomain/aliasdomain and subdomain/aliasdomain vhost?
When you connect directly to port 3000 like that, you are talking to your nodejs server, not to your webserver (apache or nginx); it is the webserver, not nodejs, which is configured with an ssl certificate. Instead of redirecting testh.domain.com to testh.domain.com:3000, you need to configure a reverse proxy connection (so your browser will access https://testh.domain.com/ and the web server will proxy the connection to port 3000).
Much thanks. For this I need vhost for subdomain and inside it ProxyPass and ProxyPassReverse from testh.domain.com:3000 to /, am I right? Can somebody tell me what about (added line in main domain vhost) my PostScriptum from last post? PS I removed subdomain from "Subdomain for website" and added under "Subdomain (vhost)". Unfortunatelly subdomain is not under ssl. I should check both options LE SSL and SSL. Second thing that without check "Rewrite HTTP to HTTPS" subdomain is redirected like main domain.