zEitEr
Super Moderator
Install nginx_mainline
Run this code to get a script to install nginx_mainline:
With this you will get a script build_nginx installed - with the script you can check/download/install a mainline version of NGINX.
Custombuild2 script can be still used to install NGINX version, but you will need to run
or
That's it! You can stop here. And you do not need to follow old way if you installed the script using the new way.
Press "Insert" and paste the following code into the created file:
Press "Escape" then ":x" and "Enter" to save and exit.
To get nginx mainline installed:
Later when a new version will be released just update the script with its number, ie. line:
If you need to configure nginx with your own set of options/modules run this code:
Stand-alone NGINX:
Update custom/nginx/configure.nginx with your instructions.
Re-install nginx
Nginx in front of Apache:
Update custom/nginx_reverse/configure.nginx with your instructions.
Re-install nginx
Run this code to get a script to install nginx_mainline:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NEW WAY ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Code:
cd /usr/local/directadmin/custombuild/
wget https://raw.githubusercontent.com/poralix/directadmin-utils/master/nginx/build_nginx -O /usr/local/directadmin/custombuild/build_nginx
chmod 755 ./build_nginx
./build_nginx
With this you will get a script build_nginx installed - with the script you can check/download/install a mainline version of NGINX.
Code:
./build_nginx versions && ./build_nginx install
Custombuild2 script can be still used to install NGINX version, but you will need to run
Code:
./build_nginx versions && ./build_nginx download
or
Code:
./build_nginx cron first
- The latest version number of NGINX mainline is taken from NGINX repositories. 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.
That's it! You can stop here. And you do not need to follow old way if you installed the script using the new way.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ OLD WAY ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Code:
cd /usr/local/directadmin/custombuild/
touch ./build_nginx1
chmod 755 ./build_nginx1
vi ./build_nginx1
Press "Insert" and paste the following code into the created file:
Code:
#!/bin/bash
NGINX_VER=1.15.1
cd /usr/local/directadmin/custombuild
cat custom_versions.txt | grep -Ev "^nginx:|^$" > custom_versions.txt.new
mv -f custom_versions.txt.new custom_versions.txt
echo "nginx:${NGINX_VER}:" >> custom_versions.txt
wget http://nginx.org/download/nginx-${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:
Code:
cd /usr/local/directadmin/custombuild
./build_nginx1
Later when a new version will be released just update the script with its number, ie. line:
Code:
NGINX_VER=1.11.4
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CUSTOMIZING ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you need to configure nginx with your own set of options/modules run this code:
Stand-alone NGINX:
Code:
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:
Code:
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
Last edited: