<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[nginx: [warn] the log_format directive may be used only on http level 解决方法]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Sat, 14 Jul 2012 04:11:27 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	root@192.168.1.105:/usr/local/webserver/nginx/sbin# ./nginx -V<br/>nginx version: nginx/1.2.2<br/>TLS SNI support enabled<br/>configure arguments: --user=www --group=www --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/root/software/nginx_http_push_module-0.692 --add-module=/root/software/ngx_cache_purge-1.3<br/><br/>出现：<br/>root@192.168.1.105:~/software/nginx-1.2.2# sh /root/runnginx.sh <br/>nginx: [warn] the &quot;log_format&quot; directive may be used only on &quot;http&quot; level in /usr/local/webserver/nginx/conf/nginx.conf:157<br/>nginx: [warn] the &quot;log_format&quot; directive may be used only on &quot;http&quot; level in /usr/local/webserver/nginx/conf/nginx.conf:181<br/>nginx: [warn] the &quot;log_format&quot; directive may be used only on &quot;http&quot; level in /usr/local/webserver/nginx/conf/nginx.conf:200<br/>nginx: [warn] the &quot;log_format&quot; directive may be used only on &quot;http&quot; level in /usr/local/webserver/nginx/conf/nginx.conf:230<br/>nginx: [warn] the &quot;log_format&quot; directive may be used only on &quot;http&quot; level in /usr/local/webserver/nginx/conf/nginx.conf:274<br/>nginx: [warn] the &quot;log_format&quot; directive may be used only on &quot;http&quot; level in /usr/local/webserver/nginx/conf/nginx.conf:304<br/>像这样的，不要放在server里,将/usr/local/nginx/conf/nginx.conf 里server段里的下面的日志代码移出放到该server段的后面即可。：<br/>&nbsp;&nbsp;&nbsp;&nbsp;log_format&nbsp;&nbsp;welog&nbsp;&nbsp;&#039;$remote_addr - $remote_user [$time_local] &quot;$request&quot; &#039; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#039;$status $body_bytes_sent &quot;$http_referer&quot; &#039; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#039;&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;&#039;; <br/>&nbsp;&nbsp;&nbsp;&nbsp; access_log&nbsp;&nbsp;/var/log/nginx/access.log&nbsp;&nbsp;weblog; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125; <br/><br/>注意，下面的日志是放在server之外的，即出现警告是放的位置不对&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;log_format&nbsp;&nbsp;welog&nbsp;&nbsp;&#039;$remote_addr - $remote_user [$time_local] &quot;$request&quot; &#039;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#039;$status $body_bytes_sent &quot;$http_referer&quot; &#039;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#039;&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;&#039;;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp; access_log&nbsp;&nbsp;/var/log/nginx/access.log&nbsp;&nbsp;weblog;&nbsp;&nbsp;
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] nginx: [warn] the log_format directive may be used only on http level 解决方法]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>