How to change default document_root to "web"?

OS type and version Ubuntu Linux 20.04.5
Webmin version 2.013
Usermin version 1.861
Virtualmin version 7.5
Theme version 20.13
Package updates All installed packages are up to date

I do migrate an old server to virtualmin. There was the document_root set to /web.
To make it easy for existing CMS-Systems, I’d like to set the default-value of document_root for virtualmin to /web instead of /public_html.

I use a NGINX installation.

Go to the virtual server you wish to change then Server Configuration / Website options

It’s the first thing in the window right at the top.

You’d need to change it in Server Templates to make it the default for all newly created domains.

@Gomez_Adams I’d tried this, but to change the document-root in that way, break the virtualserver. It shows “no virtualhost found”. So I have to go to nginx-vhost-file and set it manually back to previous value.
I found that this only change the root entry in Nginx, but not the php-settings or anything else which have the public_html path. BTW: It also don’t rename the existing public_html nor does it create a new directory named web.

Thanks @Joe for your answer.
I’ve looked there before, but was a bit confused about that its only point to “Apache”:

Does this also work for NGINX then?

And down there, where you can change the Document-Root there is a note, MUST Match DocumentRoot above, but I didn’t found any “DocumentRoot” above.
What is meant by this?

You’ve already been through this once before.

Bug while removing Website-Options - Virtualmin - Virtualmin Community

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