ubuntu之apache正向代理及反向代理(ProxyPass\ProxyPassReverse)
生活随笔
收集整理的這篇文章主要介紹了
ubuntu之apache正向代理及反向代理(ProxyPass\ProxyPassReverse)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
ubuntu之apache正向代理及反向代理(ProxyPass\ProxyPassReverse)
環境是UBUNTU 最新版apache2安裝的目錄結構有變化網上很多文章都不適用了。
準備
如果你原程序有問題,先清理一下
apt-get --purge remove apache2 apt-get --purge remove apache2.2-common apt-get autoremove apt-get --purge remove apache-common apt-get --purge remove apache sudo find /etc -name "*apache*" -exec rm -rf {} /; sudo rm -rf /var/www安裝
apt-get install apache2 service apache2 stop配置
(1)
a2enmod proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http(2)
修改配置 sudo vim /etc/apache2/mods-enabled/proxy.conf
如果有內容設置則設置如下:
<IfModule mod_proxy.c>#turning ProxyRequests on and allowing proxying from all may allow#spammers to use your proxy to send email. ProxyRequests Off <Proxy *>Order deny,allowDeny from all#Allow from .your_domain.com </Proxy>(3)
修改配置 vim /etc/apache2/sites-enabled/default
service apache2 restart
測試一下吧,你現在代理了百度!!!
總結
以上是生活随笔為你收集整理的ubuntu之apache正向代理及反向代理(ProxyPass\ProxyPassReverse)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 企业数字化新战场:低代码究竟是“毒瘤”还
- 下一篇: 听说程序员普遍存在这 7 个坏习惯,你如