查看nginx日志

查看nginx错误日志

ps -ef | grep nginx
查看nginx 目录

最后一行
root 25458 1 0 Mar07 ? 00:00:01 nginx: master process /www/server/nginx/sbin/nginx -c /www/server/nginx/conf/nginx.conf

vim(或cat)  /www/server/nginx/conf/nginx.conf

找到include /www/server/panel/vhost/nginx/*.host 这个真正虚拟机,查看配置的每个域名host文件

cd /www/server/panel/vhost/nginx
找到你的网站域名目录
cat testsmall.yaotiao.net.conf
找到配置的
access_log /www/wwwlogs/testsmall.yaotiao.net.log;
error_log /www/wwwlogs/testsmall.yaotiao.net.error.log;
这两个日志文件,一个为正常的日志,一个为报错日志

然后

tailf /www/wwwlogs/testsmall.yaotiao.net.error.log

使用tailf命令看日志