Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Let's assume your domain is "showoff.com" and their domain is "acme.com"</p> <p>You have two basic options: "showoff.acme.com" or "acme.showoff.com". I have done this both ways.</p> <p>For "showoff.acme.com":</p> <ul> <li>The customer will need to set up a CNAME entry pointing to showoff.com in their DNS. <em>Explaining to the customer how to do this is not trivial, and doesn't make much business sense unless you have a small, high-paying customer base.</em></li> <li>You will need to configure an Apache virtualhost to answer all requests to all domains (not just showoff.com)</li> <li>You cannot use SSL unless you configure a virtualhost and IP and certificate for each individual customer. (A pain!)</li> </ul> <p>For "acme.showoff.com":</p> <ul> <li>You will need a <a href="http://en.wikipedia.org/wiki/Wildcard_DNS_record" rel="nofollow">wildcard DNS record</a> to point *.showoff.com to your server's IP (whether this is easy depends on your DNS provider); if you are unable to do this, you will need to create a DNS record for each customer.</li> <li>You will need to configure an Apache virtualhost to answer all requests to *.showoff.com</li> <li>You can use a <a href="http://en.wikipedia.org/wiki/Wildcard_SSL_certificate" rel="nofollow">wildcard SSL certificate</a> for *.showoff.com</li> </ul> <p>In both scenarios, in your PHP you can find out what domain was requested with <code>$_SERVER['HTTP_HOST']</code>. You will want to check this against your database of recognized domains, to determine which customer's data to show.</p> <p>As you can see, most of the work is in DNS and Apache; it doesn't really matter whether you use PHP or some other language.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload