Amazon Web Services – How can I dynamically add new virtual hosts for domains pointing to my server?

I build a web application (for example: www.mywebapp.com) that allows users to point their domain – www.xyz.com – at www.mywebapp.com. When users go to www.xyz.com, their content will be served from www.mywebapp.com instead of. Users will learn how to update their @ and www A disk in the DNS settings of their domain providers to connect www.xyz.com at www.mywebapp.com.

I've read all the following links, but I'm still pretty confused:

I am new in server configurations, SSL and apache modifications, so I am very confused:

  1. I manually created a new SSL certificate for a domain www.xyz2.com, who managed to point www.mywebapp.com. However, this broke SSL support for all existing domains – * .mywebapp.com, mywebapp.com, www.xyz.com. Do I have to create virtual hosts for each domain pointing to www.mywebapp.com?

  2. Should I change /etc/httpd/conf.d/ssl.conf to add the new virtual hosts? Can multiple domains use the same DocumentRoot path?

  3. If the user updates his A disk in their hosting domain to point to www.mywebapp.comand I'm creating a new SSL certificate for their domain, what else do I have to do to serve the content of https: \ www.mywebapp.com visiting users https: \ www.xyz.com?

Any help is greatly appreciated. If more information is needed, please let me know and I will update the question.

The configuration of my server is as follows:

A big thank you for any help!