Let registered users create their sub domain/site

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
peterv0512

Let registered users create their sub domain/site

Post by peterv0512 »

Hi,

support guru mark allready informed me that by installing a separate CMSMS in a folder of the main CMS, you can create subsites which are completely controlable. But is their a way of letting a registered user create theire own site and put this in usersite.domain.com? Or if that's not possible in the way mark descibed (domain.com/usersite).

My first guess would be a function that copies or writes the CMS to that folder, but that would be awfully hard for the server. So that's not an option(or is it?).

I've been trying to start on a module to do this (not copying the entire CMSMS of course) ... but I don't really know how to start. I've downloaded the skeleton and I've seen that in the function DoAction it all begins... but what from there?

Also, the average end-user really is dumb as a post, so instead of the regular interface, it would need to been in steps: step 1 is fill in yr name, logo upload,... step2 is the firstpage title and content, step3 ... .

I have a good basic knowledge of PHP, mysql but I'm no guru ... yet ;-)

greetings and thanks in advance, peter
Nogga

Re: Let registered users create their sub domain/site

Post by Nogga »

Normally you set up subdomains in the webservers own configuration - so it has nothing to do with the cms itself. You need to get access to the webservers configuration, add such a line (I don't know exactly what the commands, e.g. for apache, are right now) and restart the webserver.

But there are also some working solutions based on php which determines the "subdomain" by analyzing the URL, the user is visiting. To use this you have to enable a "catch-all"-function that alle subdomains point to a certain place (that means that sub1.example.com is the same as sub2.example.com). The first solution is far easier to implement if you've got access to the server's configuration files.

EDIT:
A possible way to implement such a behavious is:

1. An install script which let the user choose which subdomain he wants to have (my_cms)
2. Copying all CMS-files to a directory (example.com/my_cms), set up all needed permissions
3. Execute the install script (you should modify it, so that it produces no output, setting up all user information and uses the subdomain as a db-prefix)
4. Updates your apache-configuration (assuming you are using apache as the webserver)
5. Restarts the apache-daemon

And that's it - it's not that hard to implement as far as you've got access to the apache config/daemon
Last edited by Nogga on Mon Aug 07, 2006 4:42 pm, edited 1 time in total.
Ryno

Re: Let registered users create their sub domain/site

Post by Ryno »

It's worth noting some web hosts setup a dynamic sub-domain system where http://www.yoursite.com/usersite would also resolve to http://usersite.yoursite.com
cyberman

Re: Let registered users create their sub domain/site

Post by cyberman »

It should work with a combination of pretty urls and .htaccess too ... but the problem will be the site is not fully user configurable.
peterv0512

Re: Let registered users create their sub domain/site

Post by peterv0512 »

But there are also some working solutions based on php which determines the "subdomain" by analyzing the URL, the user is visiting. To use this you have to enable a "catch-all"-function that alle subdomains point to a certain place (that means that sub1.example.com is the same as sub2.example.com).
I've done a little research, it's called wildcard dns which has to be enabled on the server. Then anythingYouWant.yourdomain.com points to the same dns (yourdomain.com). Then you can catch in php what is entered in the address bar, and redirect from their.

So now I'm going to install a clean CMSMS in a folder of the root, and let users create their site their, after they've logged in. Then I'll have to modify the 'add content' to a step1, step2,... process so that it's all nice and easy for everybody.

Thanks for youre response people.

greetings Peter.

btw.: Is the IRC channel used? I looked yesterday, but nobody home. And I guess I could use some help later on.
Locked

Return to “Modules/Add-Ons”