Skip to content

Instantly share code, notes, and snippets.

@ferdousulhaque
Last active January 31, 2023 01:22
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 ferdousulhaque/378b46657ed77d95c6e1ffb163ea1217 to your computer and use it in GitHub Desktop.
Save ferdousulhaque/378b46657ed77d95c6e1ffb163ea1217 to your computer and use it in GitHub Desktop.
steps to nginx compilation from source
# Install PCRE
unzip pcre-8.45.zip
./configure
make
sudo make install
# Extract zlib, no need to install
tar -xvzf zlib-1.2.12.tar.gz
./configure
make
#Extract openssl
tar -xvzf openssl-1.1.1k.tar.gz
# Extract and install nginx
tar -xvzf nginx-1.23.1.tar.gz
./configure --prefix=/app/data/nginx --sbin-path=/app/data/nginx/sbin/nginx --conf-path=/app/data/nginx/conf/nginx.conf --pid-path=/app/data/nginx/pid/nginx.pid --with-http_ssl_module --with-stream --with-pcre=../pcre-8.45 --with-zlib=../zlib-1.2.12 --with-openssl=../openssl-1.1.1k --http-log-path=/app/data/nginx/logs/access.log --error-log-path=/app/data/nginx/logs/error.log --lock-path=/app/data/nginx/pid/nginx.lock --http-client-body-temp-path=/app/data/nginx/client_body_temp --http-proxy-temp-path=/app/data/nginx/proxy_temp --http-fastcgi-temp-path=/app/data/nginx/fastcgi_temp --http-uwsgi-temp-path=/app/data/nginx/uwsgi_temp --http-scgi-temp-path=/app/data/nginx/scgi_temp --modules-path=/app/data/nginx/modules
make
sudo make install
cd /nginx
sbin/nginx -t
sudo chown -R app_user:app_user /usr/local/nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment