解决CentOS下不能使用NFS+Lighttpd(或者httpd)提供web服务的问题

    xiaoxiao2021-03-25  150

          用NFS从另一台服务器上mount过来一个目录,本地访问嘛事儿没有,就是没法用Apache的httpd设置成Document路径访问,郁闷了一上午,决定换个web程序试试吧,于是用了Lighttpd,发现还是不行!渣度搜了一堆没用的东西,最后还是上bing搜老外的论坛,问题顺秒啊....泪奔~~~原贴祭上来先:点击打开神贴原链接

          解决方法很简单,就一行命令:

    # setsebool -P httpd_use_nfs 1 还有个Tip: use getsebool -a | grep http to see the available selinux booleans and their current values.

    问题解决了,原因么,貌似是因为SELinux安全设置的原因,默认不允许http使用nfs...早知道就该直接关掉这玩意儿去球了~

    转载请注明原文地址: https://ju.6miu.com/read-3041.html

    最新回复(0)