訪問頁面時返回403,直接使用ip+端口訪問是沒有問題的,懷疑nginx配置有問題。nginx
查看nginx.conf文件,判斷日誌的輸出地址。rest
vi /etc/nginx/nginx.conf
打開error.log,發現類型的日誌,大體確認是權限問題日誌
2017/09/04 10:52:25 [error] 8196#0: *14 open() "/home/guopei/blog/www/static/js/admin.bundle.js" failed (13: Permission denied), client: 104.192.108.10, server: geekfe.com, request: "GET /static/js/admin.bundle.js?v=67cf9.js HTTP/1.1", host: "blog.geekfe.com", referrer: "http://blog.geekfe.com/admin"
ps aux|grep nginx
返回以下code
root 9145 0.0 0.4 122288 2176 ? Ss 10:56 0:00 nginx: master process /usr/sbin/nginx root 9146 0.0 0.7 122808 3880 ? S 10:56 0:00 nginx: worker process root 9212 0.0 0.1 112644 960 pts/0 S+ 10:57 0:00 grep --color=auto nginx
查看nginx.confserver
user nginx;
改爲blog
user root;
service nginx restart;
重啓後問題解決。進程