简体   繁体   English

在虚拟服务器内部的Apache中设置转发代理

[英]Setup a forward proxy in apache inside a virtual server

I would like to setup a forward proxy on my server but only within a specific virtual-host. 我想在服务器上但仅在特定虚拟主机中设置转发代理。 For example: proxy.myserver.com I would like all my other domain (myserver2.com) and subdomains (www.myserver.com) to remain as-is, with no proxy capabilities. 例如:proxy.myserver.com我希望所有其他域(myserver2.com)和子域(www.myserver.com)保持原样,没有代理功能。

What made sense to me was to to do this: ServerName proxy.myserver.com ProxyRequests On 对我来说有意义的是这样做:ServerName proxy.myserver.com ProxyRequests On

But this doesn't work. 但这是行不通的。 Any ideas? 有任何想法吗?

I use this config to forward all subdomain.domain.tld requests to my tomcat server on port:8080 (to my application called path) 我使用此配置将所有subdomain.domain.tld请求转发到端口8080上的tomcat服务器(到名为path的应用程序)

<VirtualHost *:80>
ServerName subdomain.domain.tld
ProxyPass       /path/ http://localhost:8080/path/
ProxyPassReverse  /path/ http://localhost:8080/path/
</VirtualHost>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM