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 (new way)

| 14:33:06 06.10.2016

We at poralix.com prepared and tested two simple scripts to make the process of installation of NGINX mainline version on a Directadmin server as simple as possible:

  • build_nginx - A script (the first edition) to install a mainline version of NGINX with custombuild2. A version number of NGINX mainline is taken from NGINX's trac site. 
  • build_nginx2 - A script (the second edition) to install a mainline version of NGINX with custombuild2. A version number of NGINX mainline is taken from versions.txt of Directadmin.

You can use any of them. Try both and see which one you like the most.

Installation of the script (the first edition)

Here are instructions on how to get it working with the first edition of the script (you don't need to follow this if you installed the second edition):

cd /usr/local/directadmin/custombuild/
wget -O build_nginx https://raw.githubusercontent.com/poralix/directadmin-utils/master/nginx/build_nginx
chmod 755 ./build_nginx
./build_nginx

Installation of the script (the second edition)

Here are instructions on how to get it working with the second edition of the script (you don't need to follow this if you installed the first edition):

cd /usr/local/directadmin/custombuild/
wget -O build_nginx2 https://raw.githubusercontent.com/poralix/directadmin-utils/master/nginx/build_nginx2
chmod 755 ./build_nginx2
./build_nginx2

Insights

With the commands provide above you will get a script build_nginx and/or build_nginx2 installed - with the scripts you can install a mainline version of NGINX with custombuild2 on a Directadmin server. 

  • A version number of NGINX mainline is taken from versions.txt of Directadmin if use the second edition and from NGINX trac file if you use the first edition. So no need to adjust version manually. 
  • No MD5 checksum is done in the script. It's up to custombuild to check md5-sum of a file with NGINX sources. 
How-To install nginx_mainline with CustomBuild 2

FAQ: How to upgrade NGINX later?

Run the following commands if you need build or upgrade NGINX mainline:

Re-install nginx with:

cd /usr/local/directadmin/custombuild/
./build_nginx2

FAQ: How to configure NGINX with custom options and 3rd-party modules?

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 with:

cd /usr/local/directadmin/custombuild/
./build_nginx2


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 with:

cd /usr/local/directadmin/custombuild/
./build_nginx2

Discussion:

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