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:
You can use any of them. Try both and see which one you like the most.
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
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
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.
Run the following commands if you need build or upgrade NGINX mainline:
Re-install nginx with:
cd /usr/local/directadmin/custombuild/ ./build_nginx2
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: