I wish to produce a web application that enables customers to register, purchase a domain title and make their very own website. This is completed in Ubuntu 9.10, Apache 2, Mysql 5 and Php 5.

Right now, the only real section of development I am uncertain about may be the domain title registration and mapping it to the net application.

I am likely to postpone developing the net interface that allows customers register domain names because I not have the smallest idea how to get it done. For the moment, I'll let an worker register the domain title around the user's account. I'll automate the procedure in te future (any suggestions about this matter could be appreciated). The worker will even input the registered domain title into my Content management systems, that will also update the Apache VirtualHost files with new domain information. I'll possess a cron job reload Apache every a few minutes to capture the virtualhost changes.

Performs this seem such as the right approach? Will what I am going to do be very troublesome towards the server? Can anybody offer suggestions or explain issues I need to understand?

Additional particulars

the documentroot will stay the same at /var/www/public_html/websitemaker/ for those domain names. I'll track user configurations and designs in line with the PHP's $_SERVER variable

I do not believe restarting apache every a few minutes is what you want because it will not be great for scaling.

One option is to make use of logic grab the the domain title accustomed to access the website. Verify that against your listing of accounts in MySQL. If there's a match then load the customers site and when not then become normal or send to error page.

For signing up domains you will have to create (or use and existing) a script implenting an API towards the registrar of your liking. They'll provide a chance to see if a website can be obtained or otherwise and also to register it setting it specific DNS values (plus other available choices too) all instantly.

I believe what you are searching for is Apache with mass virtual hosting to ensure that it's not necessary to restart/reload Apache every 5 mins. Any sort of questions regarding this is appropriate for Serverfault.