<div>Finally...</div>
<div>The question is, in nginx config, when forwarding php to apache,</div>
<div> </div>
<div>#proxy_hide_header Content-Type;</div>
<div> </div>
<div>maybe here changed the content-type of the ajax file,so it doesn't work.</div>
<div> </div>
<div>I delete this line,It work good now.</div>
<div> </div>
<div>Thanks everyone.<br><br> </div>
<div><span class="gmail_quote">2008/5/20, baalchina <<a href="mailto:baalchina@gmail.com">baalchina@gmail.com</a>>:</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> </div>
<div>In this forum system, ajax using a template calling "header_ajax.htm".</div>
<div> </div>
<div>The content of the file is:</div>
<div>---------------------------------------------------------------------------------</div>
<div>{eval ob_end_clean();}<br>{eval ob_start();}<br>{eval @header("Expires: -1");}<br>{eval @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);}<br>{eval @header("Pragma: no-cache");}<br>
{eval @header("Content-type: application/xml; charset=$charset");}<br>{echo '<?xml version="1.0" encoding="'.$charset.'"?>';}<br><root><![CDATA[</div>
<div>---------------------------------------------------------------------------------</div>
<div> </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> </div>
<div>The file is a .htm file, but in it ,it declars "Content-type: application/xml".</div>
<div> </div>
<div>Any ideas?</div>
<div> </div>
<div>Thankyou~<br><br> </div>
<div><span class="gmail_quote">2008/5/20, baalchina <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:baalchina@gmail.com" target="_blank">baalchina@gmail.com</a>>:</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't work.<br>Other functions,such as post a topic,replay,login,download, work very well.<br><br>The forum'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 www www;<br>worker_processes 4;<br>error_log /data/logs/nginx/error.log;<br>events {<br> worker_connections 10240;<br>}<br><br><br>
http {<br> include mime.types;<br> default_type application/octet-stream;<br> limit_zone one $binary_remote_addr 10m;<br> sendfile on;<br> tcp_nopush on;<br>tcp_nodelay off;<br> keepalive_timeout 10;<br>
gzip on;<br> server {<br> listen 80;<br> server_name <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://bbs.nau.edu.cn/" target="_blank">bbs.nau.edu.cn</a>;<br> location /status {<br>
stub_status on;<br> access_log off;<br> auth_basic "NginxStatus";<br> auth_basic_user_file htpasswd;<br> }<br><br> location / {<br> root /data/web/bbs;<br>
index 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&page=$2 last;<br>
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?<br>tid=$1&extra=page\%3D$3&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> break;<br> error_page 404 /404.html;<br> error_page 403 /403.html;<br> }<br> error_page 500 502 503 504 /50x.html;<br>
location = /50x.html {<br> root html;<br> }<br> location ~ \.php$ {<br> proxy_pass <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>
proxy_redirect off;<br> proxy_set_header Host $host;<br> proxy_set_header X-Real-IP $remote_addr;<br> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
proxy_hide_header Content-Type;<br> }<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