歡迎您光臨本站 註冊首頁

apache正常解析 php 而nginx代理過去成下載

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

apache正常解析 php 而nginx代理過去成下載

apache正常解析 php 而nginx代理過去成下載


apache埠在81  通過ip:81 訪問 可以解析出php  但是開啟nginx 后  通過ip訪問html 正常  訪問php 卻無法通過代理 到後端的apache  求解,謝謝

ps:nginx 版本 1.1.3 謝謝

附 配置文件:
hello.conf


server
{
listen  80;
server_name    192.168.1.133;
index index.html index.htm index.php;
root    /data/www/;

location /nginx {
stub_status on;
auth_basic  "NginxStatus";


access_log off;
}



location ~ .*/.(php|php5)?$ {
# index index.php;
# root /data/www/;   去這倆行后情況依舊
proxy_pass    http://127.0.0.1:81;
}

include proxy.conf;

if ( !-e $request_filename) {
proxy_pass  http://127.0.0.1:81;
}

location ~* /.(jpg|jpeg|gif|png|swf)$ {
if (-f $request_filename) {
root /data/www/;
expires    30d;
break;}
}
location ~* /.(js|css)$ {
if (-f $request_filename) {
root /data/www/;
expires    1d;
break;
}
}
}

error_page   500 502 503 504  /50x.html;
location = /50x.html {
root   html;
}



}

[火星人 ] apache正常解析 php 而nginx代理過去成下載已經有492次圍觀

http://coctec.com/docs/service/show-post-1931.html