Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I run a small service for Norwegian customers where they get automatically installed and configured Wordpress blogs on their own domains ready immediately after payment is finished. It's quite similar to Page.ly and WPEngine, just aimed at Norwegian customers with Norwegian Wordpress, support, billing etc.

The backend is WHM/CPanel (Apache, PHP, mySQL), with a script running immediately after payment that installs and configures Wordpress and sends the customer an email with their username and password.

Newly registered domains takes some time to propagate though, so for a day or two my customers unfortunately have to use a temporary URL before I can switch them over to their own domains.

Right now my system uses mod_userdir ("serverIP/~cpanelusername"). However, it's not an optimal solution. It looks unprofessional, is confusing, and is quite problematic for both my customers and me.

I'd rather prefer the temporary URL for their blogs to be "theirdomainwithoutextension.host.no", with "host.no" being a domain I own and served from the same server as the customer sites.

I can easily modify the script to create the subdomains on my "host.no"-domain, but how can I seamlessly map the subdomains to folders owned/ran on/by different CPanel/Apache/PHP users?

share|improve this question
add comment

2 Answers

You should already be using WordPress Multisite with the domain mapping extension. If you were, this would already work out-of-the-box. (Though you need to add something to your script to set up the domain map for each new customer.) This also eliminates the need to use mod_userdir, which seems like an ugly hack...

share|improve this answer
    
I know about the WordPress Multisite functionality of course, but have decided to give my customers full-fledged Wordpress installations. WP-Multisite has some advantages, but it has quite a lot of major disadvantages as well (plugin incompatibility being a major one, but there are a lot of others). Wordpress Multisite is great for connected sites, but it's quite painful when the only real similarity between all the sites is them being Wordpress sites. Wordpress Multisite is great for blog networks, not so great for managed Wordpress hosting. –  kristofferR Oct 20 '12 at 19:46
add comment

You can park the subdomain on top of the actual user's domain using cPanel's API:

http://docs.cpanel.net/twiki/bin/view/ApiDocs/Api1/ApiPark

http://docs1.cpanel.net/twiki/bin/view/ApiDocs/Api2/ApiPark

I'd recommend against using your main domain to create these subdomains. You or someone else might not like certain contents to be associated to your company's name or domain.

share|improve this answer
    
Thanks, I'll look into this. I didn't plan to use companyname.no as the domain for these subdomains, I've chosen a spesific domain just for this purpose. ;) –  kristofferR Oct 20 '12 at 19:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.