ubuntu14.04+apache2.4反向代理

wKioL1WOYlXQaeRCAADl-E1M50c206.jpg

首先安裝反向代理the Reverse Proxy

sudo a2enmod proxy proxy_http

然後在Apache中配置反向代理configuration of the reverse proxy.

cd /etc/apache2/sites-available

sudo vim 000-default.conf

加入下面內容

ProxyPreserveHost On #開啓反向代理

ProxyRequests off #關閉正向代理

# Allow from everywhere        

<Proxy *>

     Order deny,allow                

     Allow from all  #代理任何        

</Proxy>

# Send all requests to port 8080 將請求發到8080端口,如果8080nginx的話,nginx處理請求,並且mod_security正常運行攔截

ProxyPass / http://www.test.com:8080/

ProxyPa***everse / http://www.test.com:8080/


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章