【问题标题】:mod_proxy / proxypass errormod_proxy / proxypass 错误
【发布时间】:2016-08-13 09:00:41
【问题描述】:

mod_proxy 和 proxypass 指令出现以下错误:

我的虚拟主机文件:

    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_http_module modules/mod_proxy_http.so


    <VirtualHost *:80>
    #ForensicLog logs/debuglog
    ServerName updatefw.example.com
    ServerAdmin support@example.com
    ErrorLog logs/updatefw-error.log
    CustomLog logs/updatefw-access_log common
    ProxyPass / balancer://test
    ProxyPassReverse / balancer://test

    <Proxy balancer://test>
      BalancerMember http://10.10.20.12:80
    </Proxy>

</VirtualHost>

当我浏览 updatefw.example.com 时,我从索引文件中得到 200:

[root@10.10.20.12 updatefw.example.com]# pwd
/var/www/vhosts/updatefw.example.com
[root@10.10.20.12 updatefw.example.com]# cat index.html

OK

但是,当我尝试浏览子目录中的文件时,出现 500 错误:

http://updatefw.example.com/pepe/asdf.txt

/var/www/vhosts/updatefw.example.com/pepe
[root@10.10.20.12 pepe]# ls
asdf.txt

错误日志:

[Wed Apr 20 11:43:53.046606 2016] [proxy:warn] [pid 27551] [client 10.20.1.1:56553] AH01144: No protocol handler was valid for the URL /pepe/asdf.txt. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

我不知道出了什么问题,因为我正在加载 mod 代理 http 模块。 Brosing http://10.10.20.12/pepe/asdf.txt 工作正常

对此有什么想法吗?

【问题讨论】:

    标签: apache mod-proxy proxypass


    【解决方案1】:

    已解决:

    ProxyPass / balancer://test/
    
    ProxyPassReverse / balancer://test/
    

    平衡器名称后面需要 /。

    【讨论】:

      猜你喜欢
      • 2014-11-17
      • 2014-01-16
      • 2018-02-12
      • 1970-01-01
      • 2011-12-10
      • 2011-01-14
      • 2012-08-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多