Please excuse me, I have little experience in setting up web servers, so I’m asking for help. There is server A and server B of an Apache web server, there is domain.com (server A) and sub.domain.com (Server B). There is a white IP that forwards to domain.com. How to make a config correctly to open a subdomain via https
On server A there is a config for forwarding the subdomain to server B
<VirtualHost *:80>main domain config here
<VirtualHost *:80>
ServerName sub.domain.comSSLEngine OnSSLCertificateFile /etc/letsencrypt/live/sub.domain.com/fullchain.pemSSLCertificateKeyFile /etc/letsencrypt/live/sub.domain.com/privkey.pemProxyRequests OffProxyPreserveHost On<Proxy *> Order deny,allow Allow from all</Proxy>ProxyPass / http://sub.domain.com/ProxyPassReverse / http://sub.domain.com/
Via http, the desired site is opened, via https, the site of the main domain is opened.