当前位置: > Linux服务器 > apache >

compile mod_proxy to existing apache (cpanel ca...

时间:2015-08-03 00:38来源:linux.it.net.cn 作者:IT

Mod proxy ini kadang2 kita perlukan untuk mengkoneksikan port tertentu to another webserver dan kadang kala build apache yang kita lakukan by default tidak mengcompile module ini, nah berikut menginsert-kan module mod_proxy ke dalam existing apache.

cd to-your-source-of-apache-build/src/modules/proxy

Bagi Cpanel servers:

cd /home/cpapachebuild/buildapache/apache_1.3.31/src/modules/proxy/

run command:

/usr/local/apache/bin/apxs -i -c *.c

mod_proxy has been created and placed straight
into the libexec directory.

add the following module directives to the httpd.conf:

LoadModule proxy_module libexec/mod_proxy.so
AddModule mod_proxy.c

Contoh penggunaannya dalam httpd.conf:

Proxypass / http://localhost:567/
ServerName your-server-name
ProxypassReverse / http://localhost:567/
ErrorLog /var/log/httpd/apps_error_log
CustomLog /var/log/httpd/apps_log combined

(责任编辑:IT)
------分隔线----------------------------