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

2019-03-25  本文已影响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

上一篇 下一篇

猜你喜欢

热点阅读