0

I'm running an Apache server with WHM/cPanel. I can create domains with my domain registrar and point them at my nameserver ip's. I can then, in WHM create a new incoming domain and, after propogation, that domain is live and on my server.

However, I want to do this programatically.

Basically, I want my users to be able to point their nameservers to mine in their own domain registrar control panels. Then they can tell me they have done so (in a software module I will write) and I want to be able to programmatically (php if poss) create that incoming domain on my server in a similar way that WHM does it.

I don't need all the stuff that WHM creates (ftp etc...) - That domain simply needs a named directory and one file in that directory - That's all (and I can already create those with php). I just need to know how to set up that incoming domain.

Any help would really be appreciated.

  • You don't know how much you don't know here. The heart of the matter is the stuff you have not mentioned - how to configure the web server. Once you have done this everything falls into place. You need to work out how you are going to implement name based virtual hosting, then use php or your favourite language to script it. – davidgo Dec 08 '19 at 18:14
  • Alternatively, if you can handle the massive limits it puts on your setup you could probably do IP based virtual hosting, and then use a script to pick up the header and file and include or display it - you would need a stanza like the http config / .htaccess to push anything into your control php file. (Like WordPress does) – davidgo Dec 08 '19 at 18:18
  • Thanks davidgo - I'm a coder and not a server expert unfortunately. I did ask my "server expert" but he didn't know either. I knew it would be much more complex than I thought but I guess without real knowledge of hosting server config and setup this is something that I might have to find a different solution to ? – Chris Carter Dec 08 '19 at 22:36

0 Answers0