PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Oct 20, 2019 4:18 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Jul 20, 2013 7:26 pm 
Offline
Forum Commoner

Joined: Tue Apr 01, 2008 8:26 pm
Posts: 26
I'd like to create a site that allows photographers to create their own site with their own domain. They join my site, sign up, choose a template, edit their text, upload photos and they have their own site at http://theirdomain.com. Simple concept but here's my question to get the conversation started:

My main site holds the templates. When a visitor goes to theirsite.com, how do I reference back to my site to return the template, content, photos, etc?


Top
 Profile  
 
PostPosted: Sat Jul 20, 2013 8:15 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6617
Location: WA, USA
Either
a) You sell them the things to make their site, they copy it to their site, and you're done with it. You're basically providing something like WordPress.
b) Their site runs on your machines. Their domain points to your machines. They own the domain name (or possibly not) but you host their website.


Top
 Profile  
 
PostPosted: Sat Jul 20, 2013 9:30 pm 
Offline
Forum Commoner

Joined: Tue Apr 01, 2008 8:26 pm
Posts: 26
Right, option B is exactly what I'm going for. I want it to be completely automated. That's where I'm hung up. Can you give me the gist of what it takes to have that happen? So we have mydomain.com where they sign up, choose a template, etc. They point their nameserver to my dns1.mydomain.com as an example. Then what?


Top
 Profile  
 
PostPosted: Sat Jul 20, 2013 10:03 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6617
Location: WA, USA
Set up Apache so that there's only one website configured. When people go to visit the site Apache will pick it up and, lacking a specific website for that name, it'll use the default website. The same code executes for everybody but it uses the hostname to decide specifics (ie, which templates to use).
Another method is to actually have a new VirtualHost for each site, then reload Apache when there are new sites. I don't know how well that performs. You'd still point them all to the same code though.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group