I have a web app running on a dedicated Xamp Linux server. This app provides a "private" community portal for each customer account that registers. works in multitenant mode, meaning that there is one instance of the software and there is one database (MySQL) running. My app is developed in PHP. Currently every customer can to login to its account (and portal) using: www.abcd.com/Login.php?account=customerxyz. They can also login using a subdomain: customerxyz.abcd.com.
However, I want to offer my customers the feature "use your own domain" (also called custom domain) where my customer's can point their domain (www.customerxyz.com) to our domain (www.abcd.com). So when they type their domain (www.customerxyz.com) actually they get the page as when using the subdomain option (customerxyz.abcd.com), and that all the app pages come out from their custom domain. Our app is built with relative page references, so it is ready for "custom domains".
I need some advice as to how to setup my Apache server (or a PHP script) to be able to accept these custom domains. I googled but I got only references to how to setup multidomain hosting (virtual hosting of different domains) which is a different matter. Also I am looking for an answer that can minimize or eliminate having to do manual configuration for each and every new custom domain, as I have many customers signing-up every month. So a configurationsolution that can tackle all posible new custom domains would be excellent.
Any help is appreciated.