您的位置:首页 > 运维架构 > Nginx

nginx问题处理

2019-03-18 16:30 21 查看
版权声明:转载请注明出处来自 https://blog.csdn.net/qq_26741767 https://blog.csdn.net/qq_26741767/article/details/88641910

nginx问题处理

情况1:

phpinfo()访问时nginx日志提示上图警告,说明时间没有设置,需要找到php.ini设置时间,找到配置中的以下内容:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =
修改为:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = UTC
不要修改为PRC,还是会出现警告如下:

情况2:

提示没有找到图标,不算错误,虽然不影响访问,但是一直在日志里边刷看着也不爽,就把它处理了
#打开配置文件
vi /usr/local/nginx/conf/nginx.conf
在server内添加如下内容:
location = /favicon.ico {
return 204;
access_log off;
log_not_found off;
}
保存好重启nginx,php-fpm即可

情况3:

nginx异常关闭后再次启动后查看配置时会出现此提醒,根据提醒内容,确认配置没问题之后删除对应的临时文件/usr/local/.nginx/conf/.nginx.conf.swp

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: