Virtualmin created subdomains maintaining the existing folder structure as expected
I want to create new subdomains in the same structure rather then subserver
Ultimately I want to end up with the same folder structure for all subdomains/subservers migrated and newly created
I tried to convert subdomain to subserver but seems like the conversion process has some bugs and leaves some places not converted properly, I have ended up with 404 Not Found error - so stuck
What I would like
I want to end up with same directory structure for all my subdomains I migrate from cPanel backup and any new subdomain/subserver I am going to create in virtualmin
So either I want to be able to create new subdomains with similar structure as my cPanel migrated subdomains - I would prefer this
Or I would like to convert al cPanel migrated domains to subservers and make them work correctly
I have already done this step but the converted subdomain → subserver is now giving me 404 not found. I did find that HTTPS port was not corrected by the migration process but after correcting it, I was still seeing 404 not found. However I have just restarted my server and it is working now, I think I need to bounce HTTPD service.
Although I prefer the way subdomains are created in my account, would have been great to be able to create new subdomains in the same way in virtualmin GUI as well.
I have found a way to manipulate that by creating a symlink as below:
There are advantages to having the sub server setup. For example you can request the sub servers own ssl cert so you don’t have to include the sub domain in the top level cert and have the sub server run a different version of php to the parent. Why you got that error I don’t know, I did a conversion today with no errors
When you migrate a cPanel domain that has subdomains, it enables the Sub-domain type in Virtualmin, and it will import your domains with the cPanel style directory structure.
This is the simplest thing, which is why it’s the default.
And, once the sub-domain type is enabled, you can create new sub-domains which will have the same directory structure.
You can. Let’s focus on why that’s a problem, if that’s how you want to do it, rather than getting lost in the weeds talking about other stuff.
When you click Create Virtual Server with a domain selected, are you not seeing a Sub-domain button at the top where it says “New virtual server type:”? And, does it not work as expected?
Excellent, so I am definitely missing this button which would make life very simple indeed. I selected the root domain that I have imported into virtualmin through cPanel backup containingg subdomains. I only see the following options:
Sub-server
Alias to < main domain name >
Alias to < main domain name >, with own email
Would appreciate if I can see the subdomain button and create it.