【发布时间】:2016-04-16 11:29:36
【问题描述】:
我有一个安装了 Webmin 和 Virtualmin 的 CentOS 6.7 服务器,托管了 15 个以上的网站。
一切正常。
但是,如果没有域名的请求(例如直接发送到 http://1.1.1.1)我想将其发送到本地网络上的另一台服务器,例如 192.168.1.10
我以前做过,不记得它很复杂,但现在我花了很多时间和挫败感来尝试完成这项工作
我不想错误配置 Apache 并最终让黑客嘲笑我并通过我的服务器代理,所以我想确保它配置正确
我还不能让它工作。
这是我的配置:
<IfModule mod_proxy.c>
ProxyRequests On
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
#
ProxyVia On
#
# To enable a cache of proxied content, uncomment the following lines.
# See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
#
#<IfModule mod_disk_cache.c>
# CacheEnable disk /
# CacheRoot "/var/cache/mod_proxy"
#</IfModule>
#
</IfModule>
<VirtualHost *:*>
ProxyPreserveHost On
ProxyPass / http://192.168.1.1:80/
ProxyPassReverse / http://192.168.1.1:80/
</VirtualHost>
【问题讨论】:
标签: apache proxy webmin virtualmin