Skip to content

Instantly share code, notes, and snippets.

@mattrude
Created March 20, 2023 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattrude/b7b6103da2acd10816e08e0327b79d87 to your computer and use it in GitHub Desktop.
Save mattrude/b7b6103da2acd10816e08e0327b79d87 to your computer and use it in GitHub Desktop.
Build Nginx from Source

Download Latest Nginx Version from http://nginx.org/download/

mkdir -p /var/src/
cd /var/src/
wget http://nginx.org/download/nginx-1.23.3.tar.gz
tar -xzf nginx-1.23.3.tar.gz
cd nginx-1.23.3

Then Build the software

./configure --prefix=/usr/lib/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --with-pcre  --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-http_ssl_module --with-http_image_filter_module=dynamic --modules-path=/etc/nginx/modules --with-http_v2_module --with-stream=dynamic --with-http_addition_module --with-http_mp4_module --with-http_dav_module --add-module=/var/src/nginx-dav-ext-module/ --with-ssl_stapling_module --with-http_realip_module ; make; sudo make install; sudo systemctl restart nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment