Change home directory outside /home gives 404

OS type and version Debian Linux 10 w/Nginx
Virtualmin version 6.17-3

After creating a virtual serveur in Virtualmin, the site is seen on the web.
But after moving the directory via Change Domain Name outside of /home, the site gives a 404 Not Found error.

How can I correct this ?

Many thanks for help.

Just don’t do that? User homes live in /home

Yes thank you Joe, but in this case, I need to increase through an NFS folder the limited space I have in /home.
Then I wonder why VirtualMin has a possibility to move if it is not allowed.

I mean, you can, as long as you aren’t using Apache+suexec. I just don’t think it’s a good idea.

But, if you want us to help make it work, we’ll need to see the error log entry and the relevant virtual host configuration section.

You can always mount bind /home whatever directory:

mount --bind /mnt/nas1/home /home

That shouldn’t be necessary/useful for nginx, though, right? No suexec with nginx.

Yes, right. Although, it shouldn’t be necessary at all on Debian systems as it has suexec-custom package, where the path isn’t hardcoded.

I think it’s just easier to mount bind rather than re-configure home directory location.

That is irrelevant to this topic.

@Jamie, let’s add a sanity check when changing domain home directory, to be inside of what’s defined in System ⇾ Users and Groups module?

Oh, right … I missed that it was Nginx.

I suppose we could add a check that the home directory is in a location that’s allowed by suexec, if it’s in use for the domain.

Hello Illia, if the mount bind /home wouldn’t work w/ nginx, is there a possibility to extend the location allowed ?

It has nothing to do with Nginx, as mount --bind is the kernel feature, and always available. Besides, you could always use bindfs or nullfs (on FreeBSD) to creates a view.

But, that is not necessary, as I said. nginx is not using suexec.

I am very sorry, I am kind of lost.
After moving a working well VM (using NFS) to a new Proxmox server, on the transferred VM everything crazy. Using rsync from a folder to another made the original folder empty and the receiving one as well. The data disappeared. Couldn’t use the mail or the website that is located on the NFS space.
I noticed in Webmin, that the Bind server is not active. Can it be the reason of the issues.

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