![更多解释已作为答案发布:](https://linux22.com/image/931113/%E6%9B%B4%E5%A4%9A%E8%A7%A3%E9%87%8A%E5%B7%B2%E4%BD%9C%E4%B8%BA%E7%AD%94%E6%A1%88%E5%8F%91%E5%B8%83%EF%BC%9A.png)
Warning: Changing vhosts directory with the SELinux enabled in Plesk will break websites. This is due to SELinux limitation: it stores absolute paths in its policies, /var/www/vhosts, in this case. As a workaround, set SELinux to permissive mode before applying steps below.
After changing vhosts folder, SELinux should be kept in the permissive mode for correct websites working capacity. As an alternative workaround, mount new partition as /var/www/vhosts.
你好,我是 Linux 新手,需要帮助。如何将 /home 分区挂载为 /var/www/vhosts。
更多解释已作为答案发布:
我在服务器上安装了 PLESk。我以为 PLESK 网站会存储在/home
我有很多空间的地方,但不幸的是它存储在我的根分区上。所以现在根分区已经满了。之后我搜索了一下,找到了这篇文章
https://support.plesk.com/hc/en-us/articles/213367009
根据他们的指示使用此脚本:
plesk bin transvhosts.pl --dest-dir /home --correct-script
我已把所有域名移至/home
分区。
因此,上述文章说,更改 vhosts 文件夹后,SELinux 应保持在宽容模式,以确保网站正常工作。因此有两个选择:
- 永久禁用 SElinux
- 另一个选择是我正在尝试做的。