0

I've created an application using PHP and MySQL. I would like to setup access to the system across multiple domains. The application is hosted on my own domain and I'd like to use a CNAME for each customer to access it.

Customer A: http://myapp.domain-a.com Customer B: http://system.domain-b.co.uk

Can anyone give me some guidance on how I can achieve this please.

LinusIT
  • 1
  • 4

1 Answers1

0

you could do this via DNS hook of the domain(s). For example: Change the DNS Settings of domain-b.co.uk and edit the corresponding DNS entry (CNAME) of the subdomain system and change the Alias-Name for this subdomain (system.domain-b.co.uk) to domain-a.com.

Now all requests to system.domain-b.co.uk get redirected to your server at domain-a.com. Then you just have to make sure that the server behind domain-a.com accepts requests from system.domain-b.co.uk by adding an vhost OR route all incoming requests of this machine by default to the vhost of myapp.domain-a.com if no alternative route is defined.

Pros of using a Alias-Name (instead of using a static IP address): if the IP Address of domain-a.com changes, you don't have to edit the settings of system.domain-b.co.uk.

PS: DNS Changes may take up to 24-48 hours coming into effect

simplyray
  • 1,200
  • 1
  • 16
  • 25
  • Thanks for the reply, I don't think I've explained it 100% though. The subdomains I mentioned at first were for two seperate customers, I didn't mention where the files were hosted. I think I understand your suggestion although I don't host my system myself, meaning I don't have access to any apache configuration files. The files are hosted on my site which has Cpanel. I need to be able to point **myapp.domain-a.com** to **app.myhosteddomain.com** and **system.domain-b.co.uk** to **app.myhosteddomain.com**. – LinusIT Jan 17 '13 at 14:22