*** THERE IS A NEW VERSION OF THE GUIDE (SINCE 06.10.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.
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:
#!/bin/bash NGINX_VER=1.9.11 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:
cd /usr/local/directadmin/custombuild ./build_nginx-custom
Later when a new version will be released just update the script with its number, ie. line:
NGINX_VER=1.9.11
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