hls_star 发表于 2012-9-6 14:31:46

如何开启日志

大家好,我一开如搭建网站的时候是没有选择开启日志的:/root/vhost.sh 按照步骤我没有选择开启日志,后来网站我想添加日志于是我改动了以下配置

原来:access_logoff;
改动后代码:access_log/home/wwwlogs/www.test.com.logwww.test.com;其中的test是我的域名,我这里用test代替

然后重启:出现这样的错误:
unknown log format "www.test.com" in /usr/local/nginx/conf/vhost/www.test.com.conf:68

请问如何重新开启日志功能

hls_star 发表于 2012-9-6 14:35:00

谢谢

搜索了其他帖子 找到了答案 原来上面没有写:log_formatwww.replicakind.com'$remote_addr - $remote_user [$time_local] $request '
             '$status $body_bytes_sent $http_referer '
             '$http_user_agent $http_x_forwarded_for';
页: [1]
查看完整版本: 如何开启日志