Can not create Sub Server

Ubuntu 20.04 . Webmin version 1.962
Virtualmin version 6.13 . WordPress 5.5.3

When I create a Virtual Server I get this ok:
/home/domain.com/public_html/index.html

When I try to create a Virtual Sub Server I get this message as a final:
Failed to create virtual server : Failed to open /home/sub.domain.com/public_html/index.html.webmintmp.1000412 : No such file or directory

When I check the created folders it looks like this:
/home/domain.com/domains/sub.domain.com/public_html/ (no index.html)

That is also how I want the folders to be.
But why is it not creating the index.html in the right place?

Did you have a button checked to create an initial Web page in Virtualmin > Create Virtual Server > Initial Website Content?

Richard

Hi Richard, Thanks.

First I choose the domain that will be “Parent”
Then I go to: Virtualmin > Create Virtual Server > Sub-server
There I have:
New virtual server details
Advanced options
Enabled features
Additional feature options
IP address and forwarding

Nowhere can I see “Initial Website Content”
In “Enabled Features” I have selected “Setup website for domain”.

In “New virtual server details” there is “Server configuration template” with only one option “Settings For Sub-Servers”

I went through these settings also but could not find where to change something.

Is the GPL or Pro? I have another drop-down for “Initial website content” under “IP address and forwarding”

It’s GPL. In “IP address and forwarding” I only have these 3 :

Network interface
IPv6 network interface
External IP address

And no more dropdown under “IP address and forwarding”
Is it not possible to have Sub-Servers in GPL?

It is possible in both Pro and GPL.

Your problem is unrelated to the index page. That’s a red herring. It looks like maybe memory? Something is causing Webmin to crash, I think, and memory seems the most likely culprit.

Oh, wait, no, something is wrong with the path. Sub-servers go in /home/parent-domain/domains/subserver-name/.

Literally have no idea how you’re getting /home/sub.domain.com.

I’m curious why that whole drop-down section would be missing from OP’s UI.

Richard

“Initial website content” is a Pro-only feature. Is that what you’re talking about? That’s unrelated to the problem OP is having. It just allows editing the default site at domain creation time…but, there’s always gonna be a default site unless OP has overridden it. But the problem OP is having is unrelated to index.html, even though it shows up in the error.

Yes, that’s what I was talking about. Thanks.

@Joe Strange.
Now I tested on another basically similar server. We can call it Server2. Then the Sub Server worked directly as it should.

When I try on Server1 it seems to work all the way down to Updating Webmin user … Then comes the error message:
Failed to create virtual server: Failed to open /home/sub1.domain.com/public_html/index.html.webmintmp.2380327: No such file or directory
It is trying to write index.html in the wrong place.
But “Virtual Server Summary” shows the folders correctly:
Home directory /home/domain.com/domains/sub1.domain.com
“File Manager” shows: Error opening directory /home/sub1.domain.com/public_html No such file or directory

On Server2, “Virtual Server Summary” looks like this:
Home directory /home/domain2.com/domains/sub2.domain2.com
And “File Manager” shows the file structure as it should with index.html

Both servers are Ubuntu 20.04 with the same version of Webmin/Virtualmin (1.962/6.14).
I have tried to compare the configuration between the servers but have not found any direct difference. Do not really know where to look.

Sounds like either you’ve got a weird configuration, or you previously created a user with this name that has a home directly in /home/sub1.domain, and that user is still there. Maybe you created it as a parent level server first, and there were problems when removing it?

I tried now with another domain and different subdomain on the same server.
It also failed in the same way.
Which configuration could be wrong?
Where shall I look?

@Joe Now I manually changed the path in Webmin “Apache Webserver/Edit Directives” from
“DocumentRoot /home/sub.domain.com/public_html”
to “DocumentRoot /home/domain.com/domains/sub.domain.com/public_html”
"Directory" already had correct information.
After that I was able to install Wordpress without any problems.
File manager also worked but only after restarting Apache.
All indications are that the configuration in Apache gets the wrong “DocumentRoot” when I create a sub-domain.
I do not understand why.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.