nginx: [emerg] unknown log format "access" in错误解决方法

在centOS系统中配置域名的过程中,访问浏览器可能出现
如下错误:
nginx: [emerg] unknown log format “access”。

解决:
在nginx.conf配置文件中 include vhost/*.conf; 前面添加

log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
             '$status $body_bytes_sent "$http_referer" ' 
             '"$http_user_agent" $http_x_forwarded_for';

猜你喜欢

转载自blog.csdn.net/network_dream/article/details/81328824