Nginx - changing Default root directory breaks Virtualmin

@aloxe thanks for clarifying that.

it was a step/change I would not have made, but it is obvious now that such a change being an option should be fault free or provide better warning/documentation of what it will impact.

my :no_entry:

Actually for Virtualmin users, I don’t think we should show the option to change the document root directory in the Nginx module at all, as it can cause these kinds of issues. Rather, it should be changeable on the Website Options page in Virtualmin … that’s basically what we do for Apache. This way there is no need to add some special-case callback to set_public_html_dir because it will have already been called.

3 Likes

But the Virtualmin Nginx module is a dependency of virtual-server. Does that mean we should just remove the option to change the document root completely?

1 Like

That’s a good point! Yes I think we should hide this option ..

Why not just remove it? Do we expect it to be used without Virtualmin installed?

I don’t think this is a solution. If you change the document root from the Webmin side or directly on the conf file, the problem comes back.

So, will we just drop it completely? If you prefer to hide it, can you describe when it should be shown and when it shouldn’t? Also, is the Virtualmin Nginx plugin expected to be used completely without Virtualmin installed?

Yeah I think we should..

Got it, will do!

Already done here : Only allow changing of document root if virtualmin is not installed · virtualmin/virtualmin-nginx@bf07ed0 · GitHub

3 Likes

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