免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2997 | 回复: 2
打印 上一主题 下一主题

[Web] nginx反向代理apache的webdav问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-03-07 21:58 |只看该作者 |倒序浏览
大家好,请教个问题,我用nginx反向代理apache,其它php应用都能正常访问,唯独php应用中使用了webdav的话,在nginx下就无法访问,会出现文件不存在的问题,而访问apache是可以访问的,我的反向代理配置如下:

server
{
listen  80;
server_name    php.test.net;
index index.html index.htm index.php;
root    /data0/website/;


location /nginx {
stub_status on;
auth_basic  "NginxStatus";
# auth_basic_user_file  conf/htpasswd;   
#密码由apache的htpasswd工具来产生
access_log off;
}


location / {
location ~ .*\.(php|php5)?$ {
index index.php;
root /data0/website/;
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|bmp|swf)$ {
if (-f $request_filename) {
root /data0/website/;
expires    30d;
break;
}
}
location ~* \.(htm|html|css|js)$ {
if (-f $request_filename) {
root /data0/website/;
expires    1d;
break;
}
}
}

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

#如果需要记录把下面的注释去掉
# log_format access '$http_x_forwarded_for - $remote_user [$time_local] "$request"'
#     '$status $body_bytes_sent "$http_referer"'
#     '"$http_user_agent" $remote_addr';
# access_log    logs/php.test.net_access.log    access;

}



server
{
listen 80;
server_name jsp.test.net;
index index.html index.htm index.jsp;
root /data0/website/;

location ~ / {
index index.jsp;
root /data0/website/;
proxy_pass http://127.0.0.1:8080;
include proxy.conf;
}

location ~ .*\.(htm|html|css|js|gif|jpg|jpeg|png|bmp|swf)$ {
root /data0/website/;
expires 1d;
}
}

请问有什么好的办法解决?谢谢!!!

论坛徽章:
0
2 [报告]
发表于 2013-03-08 20:51 |只看该作者
有人遇到过吗?

论坛徽章:
0
3 [报告]
发表于 2013-03-31 20:05 |只看该作者
请哪位遇到过的指点下呢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP