Reverse-proxy NGINX + Apache on Directadmin

Custombuild 2.x: NGINX + Apache

cd /usr/local/directadmin/custombuild
./build update
./build update_da
./build set webserver nginx_apache
./build nginx_apache
./build rewrite_confs


Real IP on Apache`s server-status page

yum install unzip

cd /usr/local/src
wget https://github.com/y-ken/mod_rpaf/archive/master.zip
unzip master.zip
cd mod_rpaf-master
/bin/sed -i "s/remote_/client_/g" mod_rpaf-2.0.c
make && make install


open /etc/httpd/conf/extra/httpd-includes.conf

LoadModule rpaf_module /usr/lib/apache/mod_rpaf-2.0.so
<IfModule mod_rpaf-2.0.c>
RPAFenable On
RPAFproxy_ips  *ใส่ IP ของ Server ที่นี่ครับ*
RPAFsethostname On
RPAFheader X-Client-IP
</IfModule>
 

Enable nginx_proxy_buffering

cd /usr/local/directadmin/conf/
cp -fp directadmin.conf{,~bak}
echo "nginx_proxy_buffering=1" >> directadmin.conf

service directadmin restart

cd /usr/local/directadmin/custombuild
./build update && ./build rewrite_confs

  • 0 Users Found This Useful
Was this answer helpful?