博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nginx部署react,403 forbidden
阅读量:4068 次
发布时间:2019-05-25

本文共 615 字,大约阅读时间需要 2 分钟。

配置好nginx,react build完毕,开开心心去service nginx restart,

但是 返回 403 forbidden

去查看nginx log,发现这么一行

2017/12/29 17:41:43 [crit] 30755#0: *4 stat() "/home/fgadmin/xxxx-web/build/index.html" failed (13: Permission denied), client: 112.80.52.134, server: localhost, request: "GET / HTTP/1.1", host: "106.14.2.233"

再查看nginx.conf的属性

[user@sdsfsdfsdfsdfsd conf]$ ls -l nginx.conf
-rw-r--r-- 1 root root 2717 Dec 29 19:40 nginx.conf

看来是缺少权限,修改nginx.conf,在第一行加上user root

如下

#user  nobody;user root;worker_processes  1;#error_log  logs/error.log;#error_log  logs/error.log  notice;#error_log  logs/error.log  info;...............

搞定手工

转载地址:http://qllji.baihongyu.com/

你可能感兴趣的文章
OS + Linux Disk disk lvm / disk partition / disk mount / disk io
查看>>
my read_Country
查看>>
RedHat + OS CPU、MEM、DISK
查看>>
project bbs_discuz
查看>>
net TCP/IP / TIME_WAIT / tcpip / iperf / cain
查看>>
Unix + OS books
查看>>
script webshell jspWebShell / pythonWebShell / phpWebShell
查看>>
project site_dns
查看>>
webServer kzserver/1.0.0
查看>>
hd printer lexmark / dazifuyin / dayin / fuyin
查看>>
OS + Unix IBM Aix basic / topas / nmon / filemon / vmstat / iostat / sysstat/sar
查看>>
monitorServer nagios / cacti / tivoli / zabbix / SaltStack
查看>>
my ReadMap subway / metro / map / ditie / gaotie / traffic / jiaotong
查看>>
OS + Linux DNS Server Bind
查看>>
web test flow
查看>>
web test LoadRunner SAP / java / Java Vuser / web_set_max_html_param_len
查看>>
OS + UNIX AIX command
查看>>
OS + UNIX AIX performance
查看>>
OS + UNIX AIX Tools
查看>>
my ReadBook_liutongjingjixue / circulation economics
查看>>