使用Apache上的反向代理重定向Centos上的挑战

时间:2013-08-22 14:54:17

标签: apache redirect proxy centos reverse-proxy

我已经在装有CentOS的Linux机器上安装了AllegroGraph。我打开了端口80,并在Apache上设置了一个虚拟主机,用于将流量从<serverip>/AllegroGraph重定向到我的Linux机箱,AllegroGraph在端口10035上运行。

<VirtualHost *:80>
ServerAdmin root
ServerName "myserverip"
ServerAlias server

ProxyPass /AllegroGraph/  http://localhost:10035/
ProxyPassReverse /AllegroGraph/ http://localhost:10035/

...

</VirtualHost>

可以通过这种方式访问​​应用程序,但是当我运行查询时,我得到以下结果;

Executing query failed:
'/AllegroGraph/repositories/GBA?query=select%20%3Fs%20%3Fp%20%3Fo%20%7B%3Fs%20%3Fp%20%3Fo%7D&queryLn=SPARQL&limit=100&infer=false'
(up from 'AllegroGraph') not found.

当我查看Apache日志时,我发现POST包含网址的两部分;

POST /**AllegroGraph/AllegroGraph**/repositories/GBA?query=select%20%3Fs%20%3Fp%20%3Fo%20%7B%3Fs%20%3Fp%20%3Fo%7D&queryLn=SPARQL&limit=100&infer=false HTTP/1.1" 404 145 "http://my.server.ip/AllegroGraph/repositories/GBA" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36"

0 个答案:

没有答案