My application serves landing pages and we need users to custom CNAME it
eg: {{userdomain}}.myapp.com/{{pageid}} serves the landing pages today.
User wants to map it to {{landing}}.theirsite.com
So, we allow them to cname it to {{userdomain}}-{{pageid}}.myapplanding.com
I am trying to use nginx as proxy the requests to the page. Another reason for me to use nginx is to allow SSL certs by the user as it's difficult to configure on the cloud service we use for myapp.
server {
listen 80;
server_name *.myapplanding.com;
# server_name {{userdomain}}-{{pageid}}.myapplanding.com (I want userdomain and pageid to be parsed and proxied
location / {
proxy_pass https://????; // What goes here? It should forward to https://{{userdomain}}.myapp.com/landing/{{pageid}}
}
}
Thanks.