I’m going to be launching a new web application within the next few weeks (hopefully), and the server side is a bit more complicated than what I’m used to.
I’m currently on a CentOS VPS, which runs on cPanel. Each client in this application will use their own domain name. I’m using PHP’s $_SERVER[‘SERVER_NAME’] to determine which site the application is being requested on.
Anyway, this is mostly fine and dandy when testing locally. It’s very easy to add virtual hosts manually. So, when moving this into the cPanel environment, I have a few questions:
-
How can I have it point all domains not already created as accounts, to a catch-all address? How do I set up the DNS for this?
-
If one of the customers would like email and etc. set up for them, how do I handle that? Do I need to end up creating an account in WHM for them and then set up their email. Can I do that at the DNS level only? If it’s the former, how can I easily point their web stuff to the catch-all account so I don’t have to mess with file permissions and other account differences? My host briefly mentioned add-on domains, but I’d really like to keep this entirely automated/transparent if at all possible.
If anyone has any general feedback for this type of application their advice would also be appreciated.
Thanks!