how to rebuild ngnix with new version openssl

by Lyn posted Sep 07, 2016


Prev이전 문서

Next다음 문서


크게 작게 위로 아래로 댓글로 가기 인쇄

lastest nginx for ubuntu 14.04 compile with older version openssl then not support ALPN.

Unfortunately, chrome is not support http2+NPN, only support http2+ALPN. 

require recompile nginx with new version openssl


Original :


# Install package building tools
sudo apt-get install -y dpkg-dev

# (optional) cleanup previous work directory
#sudo rm -R /opt/nginx

# Create a work directory
sudo mkdir /opt/nginx

# Switch to our work directory
cd /opt/nginx

# Get NGINX source files
sudo apt-get source nginx

# Install NIGNX build dependencies
sudo apt-get -y build-dep nginx

# Switch to the source files directory
# You might need to change the version number in your case
cd nginx-1.*

# Build the .deb package files
sudo dpkg-buildpackage -b

# Move back to out work directory where the .deb files are placed
cd /opt/nginx

# Stop NGINX
sudo service nginx stop

# Install the newly build .deb file
sudo dpkg --install nginx_1.*~trusty_amd64.deb

# Start NGINX
sudo service nginx start