Trying to set up hosted solution - how to autodetect customer domains?
I recently released a turnkey script (like WordPress) and am now looking to release a hosted solution.
I would like customers to register the domain name themselves. Then, when they sign up w/ my hosted solution, they specify their domain name and point it to my server (through their domain registrar by setting the A-record and CNAME).
i.e. something like this, though preferably simpler....
Then, my service will automatically set up the site under their domain name. I would like all customer domains to point to the same set of script files, so that I will only have to push updates to a single install of the script and it will be reflected across all customer sites/domains.
The script will detect the customer based on the domain and deliver the relevant content.
So my question is...
How do I set up my script or server to detect the customer domains?
Can anyone shed some light on this? If you could provide tutorial links related to this, that would be awesome.
Right now, I'm playing around w/ a throw-away domain. I went into GoDaddy and set the A-record to my IP and created a 'www' CNAME to point to subdomain.mydomain.com. When I go to this domain without the 'www,' it loads up the default CPanel landing page. When I go to this domain with the 'www,' it loads up my subdomain.mydomain.com page (which is working as intended).