티스토리 뷰

EN/CentOS 5

CentOS 5 WEB Server Use proxy_http

ServerWorld 2016.06.04 13:38

CentOS 5 WEB Server Use proxy_http


Use proxy_http


Foward requests to another web server by mod_proxy. This means configuring Web server as a revers proxy.


(1) www.srv.world [10.0.0.31]- Web Server#1

(2) centos5.srv.world [10.0.0.30]- Web Server#2


This example set servers that requests to Web server (1) forward to under /test on webserver (2)


1. Configure httpd.


[root@www ~]# vi /etc/httpd/conf.d/proxy.conf

# create new

# directory you'd like to foward

<Location /proxy>

   # destination directory that is forwared

   ProxyPass http://centos5.srv.world/test

   ProxyPassReverse http://centos5.srv.world/test

</Location>



[root@www ~]# /etc/rc.d/init.d/httpd restart 

Stopping httpd: [  OK  ]

Starting httpd: [  OK  ]

  Access with web browser.


First, access to the place that does not have forwarding setting. Web server (1) replys normally as a following screen.


  Access to /proxy. Web server (2) replys as a following screen.



※ Next manual



저작자 표시 비영리 변경 금지
신고

'EN > CentOS 5' 카테고리의 다른 글

CentOS 5 Apache Log Analyzer - Visitors  (0) 2016.06.07
CentOS 5 WEB Server Basic Auth + LDAP  (0) 2016.06.04
CentOS 5 WEB Server Use proxy_http  (0) 2016.06.04
CentOS 5 WEB Server Install SpeedyCGI  (0) 2016.06.04
CentOS 5 WEB Server Use PHP APC  (0) 2016.06.04
CentOS 5 WEB Server Configure WebDAV  (0) 2016.06.01
댓글