[英]How to configure Apache Proxy? Need to send requests without a domain name to a diff server
我有一台裝有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>
我知道了!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
它可以在Webmin / Virtualmin本身中修復。
只需轉到Virtualmin>(您的默認網站)>服務器配置>編輯代理網站
然后輸入您的代理地址並啟用它
它必須采用這種形式,例如192.168.1.1將無法工作:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.