When installing Nginx under Linux, the/configure phase will require the installation path to be set through prefix. Therefore, you can install multiple nginx when you specify a different prefix in the./configure.
It is worth noting that after installation, two Nginx listening ports are set to different listening ports. Otherwise, there will be a nginx that cannot be started.
/configure--prefix=/home/work/nginx1 ...//The first Nginx installation configuration make
&& make install
/configure--prefix=/home/work/nginx2 ...//The second Nginx installation configuration make
&& make install
Cd/home/work/nginx1/conf/nginx.conf && Modify the first nginx listening port.
/home/work/nginx1/sbin/nginx
Cd/home/work/nginx2/conf/nginx.conf && Modify the second Nginx listening port.
/home/work/nginx2/sbin/nginx
Above this in the Linux system installs two Nginx the simple method is the small series to share to everybody's content, hoped can give everybody a reference, also hoped that everybody supports the cloud habitat community.