在centos上部署vue時遇到的一個坑梢杭,就要手動關(guān)閉selinux.
centos部分系統(tǒng)自帶的類似防火墻安全程序,會禁止nginx代理訪問靜態(tài)資源目錄,
臨時關(guān)閉:
[root@localhost ~]#?getenforce
Enforcing
[root@localhost ~]#?setenforce 0
[root@localhost ~]#?getenforce
Permissive
永久關(guān)閉:
[root@localhost ~]# vim /etc/sysconfig/selinux
SELINUX=enforcing 改為?SELINUX=disabled
重啟服務(wù)?
reboot