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.
First of all make sure you've got custombuild 2:
cd /usr/local/directadmin/custombuild ./build version
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:
[root@server custombuild]# /usr/local/directadmin/directadmin v Version: DirectAdmin v.1.45.4
Make sure to have version of directadmin no less than 1.45.2 otherwise the things won't work.
Run this code to build nginx + apache with custombuild:
cd /usr/local/directadmin/custombuild ./build update ./build update_da ./build set webserver nginx_apache ./build nginx_apache ./build rewrite_confs
That's it. Have fun with it.
Nginx is able to serve more requests per second with less resources because of its architecture.
Nginx is faster at serving static files and consumes much less memory for concurrent requests because Nginx is event-based it doesn't need to spawn new processes or threads for each request, so its memory usage is very low.
Nginx is noted to be a good server for sites that need fast, efficient reverse proxies or fast, efficient serving of static content. It is acclaimed for having low memory usage and is recommended for sites running on a VPS.
Whether you are looking to get the most out of your VPS or are attempting to scale one of the largest Web sites in the world, Nginx may be the best tool for the job. It's fast, stable and easy to use.
Related links: