Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/261.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
php apache-反向代理双斜杠_Php_Apache - Fatal编程技术网

php apache-反向代理双斜杠

php apache-反向代理双斜杠,php,apache,Php,Apache,当我使用apache反向代理时,我遇到了引导双斜杠的问题。 ($\u服务器['REQUEST\u URI']总是以//开头,除非我直接访问根目录 配置 ProxyPass /admin/ http://admin.example.com/ ProxyPassReverse /admin/ http://admin.example.com/ or <Location /admin> ProxyPass http://admin.example.com/ ProxyPas

当我使用apache反向代理时,我遇到了引导双斜杠的问题。 ($\u服务器['REQUEST\u URI']总是以//开头,除非我直接访问根目录

配置

ProxyPass /admin/ http://admin.example.com/
ProxyPassReverse /admin/ http://admin.example.com/

or

<Location /admin>
   ProxyPass http://admin.example.com/
   ProxyPassReverse http://admin.example.com/
</Location>
ProxyPass/admin/http://admin.example.com/
ProxyPassReverse/管理/http://admin.example.com/
或
ProxyPasshttp://admin.example.com/
ProxyPassReversehttp://admin.example.com/
我试过所有可能的组合,比如

  • 代理通行证/管理
  • 代理通行证/管理
  • 代理通行证/管理/

但是运气不好。我错过什么了吗?

好的,经过更多的实验,这是有效的:

<Location /admin>
    ProxyPass http://admin.example.com
    ProxyPassReverse http://admin.example.com
</Location>

ProxyPasshttp://admin.example.com
ProxyPassReversehttp://admin.example.com

谢谢,我也有同样的问题。我没有直接访问权限,因此会将此信息传递给服务器管理员。再次感谢!