<div>Finally...</div>
<div>The question is, in nginx config, when forwarding php to apache,</div>
<div>&nbsp;</div>
<div>#proxy_hide_header Content-Type;</div>
<div>&nbsp;</div>
<div>maybe here changed the content-type of the ajax file,so it doesn&#39;t work.</div>
<div>&nbsp;</div>
<div>I delete this line,It work good now.</div>
<div>&nbsp;</div>
<div>Thanks everyone.<br><br>&nbsp;</div>
<div><span class="gmail_quote">2008/5/20, baalchina &lt;<a href="mailto:baalchina@gmail.com">baalchina@gmail.com</a>&gt;:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>er...I think I found the problem.</div>
<div>&nbsp;</div>
<div>In this forum system, ajax using a template calling &quot;header_ajax.htm&quot;.</div>
<div>&nbsp;</div>
<div>The content of the file is:</div>
<div>---------------------------------------------------------------------------------</div>
<div>{eval ob_end_clean();}<br>{eval ob_start();}<br>{eval @header(&quot;Expires: -1&quot;);}<br>{eval @header(&quot;Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0&quot;, FALSE);}<br>{eval @header(&quot;Pragma: no-cache&quot;);}<br>
{eval @header(&quot;Content-type: application/xml; charset=$charset&quot;);}<br>{echo &#39;&lt;?xml version=&quot;1.0&quot; encoding=&quot;&#39;.$charset.&#39;&quot;?&gt;&#39;;}<br>&lt;root&gt;&lt;![CDATA[</div>
<div>---------------------------------------------------------------------------------</div>
<div>&nbsp;</div>
<div>I am trying to downloading the file from my site, and the official site. The file size is different. also the md5 hash.</div>
<div>&nbsp;</div>
<div>The file is a .htm file, but in it ,it declars &quot;Content-type: application/xml&quot;.</div>
<div>&nbsp;</div>
<div>Any ideas?</div>
<div>&nbsp;</div>
<div>Thankyou~<br><br>&nbsp;</div>
<div><span class="gmail_quote">2008/5/20, baalchina &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:baalchina@gmail.com" target="_blank">baalchina@gmail.com</a>&gt;:</span> 
<div><span class="e" id="q_11a041b72c264efc_1">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hello Everyone.<br><br>I am using Apache Server for a web forum system(Discuz!,a php+mysql forum<br>popular in China). Yesterday I changed Apache to Nginx, v0.63.<br>
<br>The system runs good except one question:all functions using ajax don&#39;t work.<br>Other functions,such as post a topic,replay,login,download, work very well.<br><br>The forum&#39;s office site(<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.discuz.net/" target="_blank">www.discuz.net</a>) runs nginx 0.63 too, so I am confused...<br>
<br>BTW, I am using Nginx with Apache 2, while Apache listen to<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://127.0.0.1:81/" target="_blank">127.0.0.1:81</a>,processing the php requests. Here is my nginx config file,<br>
<br><br>======================================================================<br>user&nbsp;&nbsp;www www;<br>worker_processes&nbsp;&nbsp;4;<br>error_log&nbsp;&nbsp;/data/logs/nginx/error.log;<br>events {<br>&nbsp;&nbsp; worker_connections&nbsp;&nbsp;10240;<br>}<br><br><br>
http {<br>&nbsp;&nbsp; include&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mime.types;<br>&nbsp;&nbsp; default_type&nbsp;&nbsp;application/octet-stream;<br>&nbsp;&nbsp; limit_zone&nbsp;&nbsp; one&nbsp;&nbsp;$binary_remote_addr&nbsp;&nbsp;10m;<br>&nbsp;&nbsp; sendfile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;on;<br>&nbsp;&nbsp; tcp_nopush&nbsp;&nbsp;&nbsp;&nbsp; on;<br>tcp_nodelay&nbsp;&nbsp;&nbsp;&nbsp;off;<br>&nbsp;&nbsp; keepalive_timeout&nbsp;&nbsp;10;<br>
&nbsp;&nbsp;&nbsp;&nbsp; gzip on;<br>&nbsp;&nbsp; server {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listen&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 80;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server_name&nbsp;&nbsp;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://bbs.nau.edu.cn/" target="_blank">bbs.nau.edu.cn</a>;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;location /status {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stub_status&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; access_log&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;off;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auth_basic&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;NginxStatus&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auth_basic_user_file&nbsp;&nbsp;htpasswd;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location / {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp; /data/web/bbs;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; index&nbsp;&nbsp;index.php index.html index.htm;<br>#Discuz! Rewrite Rules<br>rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;<br>rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&amp;page=$2 last;<br>
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?<br>tid=$1&amp;extra=page\%3D$3&amp;page=$2 last;<br>rewrite ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro.php?$2=$3 last;<br>rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;<br>
rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; error_page 404 /404.html;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; error_page 403 /403.html;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;error_page&nbsp;&nbsp; 500 502 503 504&nbsp;&nbsp;/50x.html;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location = /50x.html {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp; html;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;location ~ \.php$ {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_pass&nbsp;&nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://127.0.0.1:81/" target="_blank">http://127.0.0.1:81</a>;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_redirect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;off;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header Host $host;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header X-Real-IP $remote_addr;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_hide_header Content-Type;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>}<br>}<br>=======================================================================<br><br>The mime type file is default. And I am using URL Rewrite, it works well.<br>
<br>I think it may be the mime type problem, but cannot find the solution.<br><br>So, does anyone meet the same question with me?<br><br>Thanks a lot.<br><br><br></blockquote></span></div></div><span class="sg"><br><br clear="all">
<br>-- <br>from:baalchina </span></blockquote></div><br><br clear="all"><br>-- <br>from:baalchina