Custombuild 2 allows us to have a reverse-proxy NGINX + Apache on Directadmin powered server without a need for any 3rd party scripts or plugins, addons. That's quite easy to start using it.
CustomBuild 2.x version
First of all make sure you've got custombuild 2:
You should see an output similar to the following:
[root@server custombuild]# ./build version
2.0.0-RC7 (rev: 863)
If it differes much then you've got custombuild 1.x
To check directadmin version run this code:
Make sure to have version of directadmin no less than 1.45.2 otherwise the things won't work.
[root@server custombuild]# /usr/local/directadmin/directadmin v
Version: DirectAdmin v.1.45.4
Custombuild 2.x: NGINX + Apache
Run this code to build nginx + apache with custombuild:
That's it. Have fun with it.
./build set webserver nginx_apache
UPDATE #1: Real IP on Apache`s server-status page (*** ACTUAL VERSION OF APACHE SHOULD HAVE IT FIXED ALREADY ***)
Apache gets real IPs, you may see it in $_SERVER with PHP or in apache logs; but it shows incorrect IP in apache's server status.
Please do not follow this update #1 if you have the latest apache version with a patch that fixes the issue!
Before to start, please make sure to have unzip installed on your server:
To get real IPs instead 127.0.0.1 on Apache`s server-status page you need to install mod_rpaf, as remoteip is buggy in this case:
apt-get install unzip
and insert following instructions:
into /etc/httpd/conf/extra/httpd-includes.conf and restart apache.
LoadModule rpaf_module /usr/lib/apache/mod_rpaf-2.0.so