Nginx (pronounced engine x) has been around for more than a decade. NGINX is a HTTP and reverse proxy server. It has proved its advantages over Apache in many setups:
- Nginx works faster when serving high volume of requests
- Nginx doesn’t spawn new process or thread for each request. Hence it consumes less memory and works much better with high volume of request.
- Nginx is efficient at serving of static content. It has low memory usage, but consumes more processor time compared to Apache.
- It is a great solution for dedicated and virtual private servers, where you don’t need Apache .htaccess ability.
In order to get the best of the both servers, we have NGINX serve static assets while Apache processes the dynamic content.
The new Custombuild2.x versions allows for an easy and quick installation of Apache + NGINX as a reverse proxy server. The only prerequisite for this to work is CustomBuild2.x. As 2.x version was released in 2006, the chances are that your intallation have it by the year of 2019.
In case you want to check CustomBuild version:
The command above should produce a results similar to the one below:
[root@myserver custombuild]# ./build version
2.0.0 (rev: 2084)
Also check the version of Directadmin. It should be 1.45.2 or later:
Version: DirectAdmin v.1.56.4
If you need to update software in DirectAdmin you can follow the steps provided in one of my previous posts. If you have made any changes to Apache or any other software which is installed/updated with cusombuild, they will be overwritten. As you don’t want the changes to be lost, use the official way for customization, creating a
custom directory in
Make sure you are in the right directory
mkdir -p custom
cp -Rp configure custom
After that you can edit your configs as needed.
Once you are ready with all the customizations, the following commands will help you switch to apache+nginx (apache in front of apache as a reverse proxy)
./build set webserver nginx_apache
The last command will up rewrite all configuration files, if they are not in the custom directory
chmod 755 -R public_html
. Have fun with your new installation.