美文网首页
Selinux 导致 Nginx无权限访问静态资源目录

Selinux 导致 Nginx无权限访问静态资源目录

作者: 爱睡觉的树 | 来源:发表于2019-03-25 15:55 被阅读0次

    在centos上部署vue时遇到的一个坑,就要手动关闭selinux.

    centos部分系统自带的类似防火墙安全程序,会禁止nginx代理访问静态资源目录,

    临时关闭:

    [root@localhost ~]# getenforce

    Enforcing

    [root@localhost ~]# setenforce 0

    [root@localhost ~]# getenforce

    Permissive

    永久关闭:

    [root@localhost ~]# vim /etc/sysconfig/selinux

    SELINUX=enforcing 改为 SELINUX=disabled

    重启服务 

    reboot

    相关文章

      网友评论

          本文标题:Selinux 导致 Nginx无权限访问静态资源目录

          本文链接:https://www.haomeiwen.com/subject/zhhbvqtx.html