DirectAdmin Knowledge Base and Support

DirectAdmin is a web panel for a simple administration of both virtual and dedicated servers. DirectAdmin is faster, safe and more powerful than any other CP. And we know how to customize and support it.

How-To install nginx_mainline with CustomBuild 2 (old way)

| 20:26:48 17.02.2016


Want to have nginx_mainline installed on your server to gain from using HTTP/2, here are instructions on how to install nginx_mainline.

Install nginx_mainline

Run this code to get a script to install nginx_mainline:

cd /usr/local/directadmin/custombuild/
touch ./build_nginx-custom
chmod 755 ./build_nginx-custom
vi ./build_nginx-custom

Press "Insert" and paste the following code into the created file:

cd /usr/local/directadmin/custombuild
cat custom_versions.txt | grep -Ev "^nginx:|^$" >
mv -f custom_versions.txt
echo "nginx:${NGINX_VER}:" >> custom_versions.txt
wget${NGINX_VER}.tar.gz -O nginx-${NGINX_VER}.tar.gz
./build update
./build nginx

Press "Escape" then ":x" and "Enter" to save and exit.

To get nginx mainline installed:

cd /usr/local/directadmin/custombuild

Update version very easy

Later when a new version will be released just update the script with its number, ie. line:


Custom options for configure NGINX

If you need to configure nginx with your own set of options/modules run this code:

Stand-alone NGINX:

cd /usr/local/directadmin/custombuild/
mkdir -p custom/nginx/
cp configure/nginx/configure.nginx custom/nginx/configure.nginx

Update custom/nginx/configure.nginx with your instructions.

Re-install nginx

Nginx in front of Apache:

cd /usr/local/directadmin/custombuild/
mkdir -p custom/nginx_reverse/
cp configure/nginx_reverse/configure.nginx custom/nginx_reverse/configure.nginx

Update custom/nginx_reverse/configure.nginx with your instructions.

Re-install nginx

About Us
We are a team of professionals, and specialize in installation, configuring and managing of remote virtual and dedicated servers powered by Linux/Unix-like OS with DirectAdmin. We support various sets of software, including web-servers Apache, Nginx; internet domain name servers Bind, PowerDNS; mail-servers with POP3, IMAP and SMTP, FTP-servers, etc. After years of working through the most complex server challenges our team has gathered valuable experience and universal solutions suitable for everyday tasks. We are here to lend you a helping hand and take care of your servers in order to let you have enough time to do more of what you love.

All of the information and data on this site is for informational purposes only and is provided for the convenience of the user.
Powered by: Amiro.CMS - Free edition