I configured domain using virtualmin. assume the domain is sample.com After adding that top level domain name it shows it already created mail.sample.com. I want to install RoundCube Webmail to this mail.sample.com path. But i dont know how to do this. How can i do that.
You can install Roundcube anywhere you want. The industry default is top level just for simplicities sake.
When you run the install script it ask you at the bottom where you want it. You can either do top level (which most people do) or you can add a path to install it at.
no cant see subdomain choosing option. I only have my toplevel domain but when i going to create subdomain it shows apache already have mail.sample.com
Don’t install it in mail.example.tld. That’s the mail server’s address. Using it for webmail complicates things such as redirects and the like that Apache handles.
webmail.sample.com doesn’t exist by default. It’s not anything. That’s why it would be fine to use it if that’s what you want to do. It doesn’t conflict with anything.
But you probably would be better off with sample.com/webmail or servername.sample.com/webmail in the long run.
It’s not a huge big deal, but if you wanted to do certain things in .htaccess, using a sub would add another line or two of code. Because it will work exactly the same either way, I just trail it as a subdirectory to the root of the hostname:
servername.domain.tld/webmail or
servername.domain.tld/roundcube
Maybe to clarify, Roundcube doesn’t care about the directory name it’s installed in. It can be /roundcube, /webmail, /joe, /bob, or /gertrude. If your users will be coming from a cPanel background, then /webmail would be a good way to go, just for consistency’s sake. Otherwise, the directory name doesn’t matter.
It also doesn’t matter if you make it a sub in terms of how well it will work. It’s just slightly easier to trail it.