I am using apache2 server for a domain which has several subdomains. Each subdomain needs to be on https. I have a wildcard certificate installed for this and it works fine. Now one specific subdomain domain (api.mydomain.com) needs to proxypass to a upstream node service on https. How do I achieve this in the vhost config below:
<VirtualHost *:443>
DocumentRoot /var/www/html
ServerName mydomain.com
// Need to proxy pass one subdomain (https://api.mydomain.com) to a upstream service running at 8080
# wild card certiicate for mydomain.com:
SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
Is it possible to do this in same vhost or there is a workaround with a separate vhost for api.mydmain.com
or yet another way to achieve this?