Virtual host root directory

I moved a site from one virtualmin server to another using the backup and restore feature. On the new server it has a different home directory. When I do a validate servers I get the following error, how do I update the location for virtualmin and nginx works fine?

Nginx website : The Nginx virtual host root directory is /home/riversofcarbon/public_html, but Virtualmin expects it to be /home/riversof/public_html

Status: 
Closed (fixed)

Comments

You will need to edit the config file for the domain under /etc/nginx/sites-enabled to correct the root directory path.

That said, this shouldn't be needed to be done manually. Did you restore this domain from a different system with a different home directory format?

The backup was created on another virtualmin server and then restored to this new server. There were issues creating the new virtual servers from the backup so I had to manually create the files under sites-enabled. When the restore created the new sites it did also use a new directory for some reason on the new server, hence had to change email home locations and user home directories.

There are only symbolic links under /etc/nginx/sites-enabled, I have already updated the files under /etc/nginx/sites-enabled so nginx is happy but virtualmin is still not happy.

What is the actual home directory for this domain?

Actual home directory is /home/riversofcarbon/public_html

If you run validation for this domain for all features, does it report any other errors? Like the home directory being missing?

Nope, that's the only error.

That's very confusing .. does the directory /home/riversof exist at all?

Directory /home/riversof does not exist

What output do you get if you run :

grep /home/riversof /etc/webmin/virtual-server/domains/*

grep /home/riversof /etc/webmin/virtual-server/domains/*

/etc/webmin/virtual-server/domains/140727887928791:public_html_path=/home/riversof/public_html /etc/webmin/virtual-server/domains/140727887928791:ssl_key=/home/riversofcarbon/ssl.key /etc/webmin/virtual-server/domains/140727887928791:ssl_cert=/home/riversofcarbon/ssl.cert /etc/webmin/virtual-server/domains/140727887928791:home=/home/riversofcarbon /etc/webmin/virtual-server/domains/140727887928791:stats_pass=/home/riversof/.stats-htpasswd

Ok, I see the problem now - the work-around is to edit /etc/webmin/virtual-server/domains/140727887928791 and fix or remove that public_html_path= line. The next release of the Nginx plugin will fix this properly.

Automatically closed -- issue fixed for 2 weeks with no activity.