【问题标题】:Reverseproxy Apache configuration is allowing unwanted traffic through the serverReverseproxy Apache 配置允许不需要的流量通过服务器
【发布时间】:2021-04-24 21:46:18
【问题描述】:

为了允许访问不公开的特定服务器,我们构建了一个架构,其中包含一个暴露在互联网上的 Apache 网络服务器,我们希望将其配置为反向代理,以仅将一些请求重定向到私有服务器。 这是 httpd.conf 文件的一部分:

Listen 5000    
<VirtualHost *:5000>
ServerAdmin webmaster@localhost
ServerName servername

 ErrorLog /etc/httpd/conf/error.log

#<Location />
# ProxyPass "http://...:5000/"
# ProxyPassReverse "http://...:5000"
# Order allow,deny
# Allow from all
#</Location>

ProxyRequests Off
ProxyPreserveHost On
ProxyPass "/" "http://...:5000/" interpolate connectiontimeout=30 timeout=12000
#RewriteRule ^(.*) "http://...:5000/$1"
#ProxyPassMatch ^(.*) "http://...:5000/$1"
ProxyPassReverse "/" "http://...:5000/"
</VirtualHost>

每当我们输入Listen 5000 时,大量不受欢迎的流量会通过服务器传递到 Internet 上的其他服务器。

在上面的代码中,注释行是我所做的一些尝试。

没有阻止服务器充当所有代理的配置有什么问题? 提前感谢您的帮助

【问题讨论】:

    标签: apache server reverse-proxy httpd.conf listen


    【解决方案1】:

    如果您想拒绝某些路径被代理,您必须使用“!”:这里是解释如何做到这一点的文档链接http://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-13
      • 2012-09-19
      相关资源
      最近更新 更多