Score:0

Proxy pass on apache (for a specific subdomain) with wildcard certificate

jp flag

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?

djdomi avatar
za flag
Does this answer your question? [How can I use Apache as a reverse proxy for https?](https://serverfault.com/questions/964454/how-can-i-use-apache-as-a-reverse-proxy-for-https)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.