开发者社区> 问答> 正文

nginx 反向代理给apache 怎么配置path_info?:配置报错 

链接/index.php/a/b
nginx 默认是无法找到该地址
我又没有装fastcgi//如果装了可以配置fastcgi_param PATH_INFO $fastcgi_script_name;  
所以使用反向代理交给apache处理php请求
现在的状况我要怎么配置啊,求助!

展开
收起
kun坤 2020-06-02 16:20:37 791 0
1 条回答
写回答
取消 提交回答
  • 老板阿帕奇也要有文件###### location / {
    try_files $uri @apache ;
    }
    location @apache {
    proxy_pass http://xxxxx;
    include naproxy.conf;
    } ######

    引用来自“leo108”的答案

    location / { try_files $uri @apache ; } location @apache { proxy_pass http://xxxxx; include naproxy.conf; }
    我这样写的还是不管用 ###### 既然是反向代理了, 这些都是在apache设置了, 为什么要nginx来呢###### @红薯 help
    2020-06-02 16:20:43
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Apache Flink技术进阶 立即下载
Apache Spark: Cloud and On-Prem 立即下载
Hybrid Cloud and Apache Spark 立即下载

相关镜像