diff --git a/README.md b/README.md index 9d7814f..6adf428 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # NGINX without Root This is a mini project that I'll find any workaround for building NGINX without relies on Root Required Dependencies as much as possible +The main point of the project is to configure Nginx to just work without root. So many modules are missing, but you can add them yourself. + # Setup Script ### using Curl @@ -11,12 +13,4 @@ curl https://raw.githubusercontent.com/minoplhy/nginx-noroot/main/build.sh | bas ### using Wget ``` wget https://raw.githubusercontent.com/minoplhy/nginx-noroot/main/build.sh | ./build.sh -``` - -# Root Required -I can't figure workaround for these dependencies - -``` -Openssl (unsuccessful build when using self compiled openssl) - - libssl-dev ``` \ No newline at end of file diff --git a/build.sh b/build.sh index 4c552e1..7d4293c 100644 --- a/build.sh +++ b/build.sh @@ -7,13 +7,13 @@ mkdir ~/nginx_build && cd ~/nginx_build # Get zlib cd ~/nginx_build if [[ -f "/usr/bin/curl" ]]; then - curl -L https://zlib.net/zlib-1.2.12.tar.gz --output zlib-1.2.12.tar.gz + curl -L https://zlib.net/zlib-1.2.13.tar.gz --output zlib-1.2.13.tar.gz elif [[ -f "/usr/bin/wget" ]]; then - wget https://zlib.net/zlib-1.2.12.tar.gz -O zlib-1.2.12.tar.gz + wget https://zlib.net/zlib-1.2.13.tar.gz -O zlib-1.2.13.tar.gz else echo "Required Dependencies for download zlib doesn't exist" fi -tar xzf zlib-1.2.12.tar.gz +tar xzf zlib-1.2.13.tar.gz # Get pcre cd ~/nginx_build @@ -26,17 +26,28 @@ else fi tar xzf pcre-8.45.tar.gz +# Build Openssl +cd ~/nginx_build +if [[ -f "/usr/bin/curl" ]]; then + curl -L https://www.openssl.org/source/openssl-3.0.7.tar.gz --output openssl-3.0.7.tar.gz +elif [[ -f "/usr/bin/wget" ]]; then + wget https://www.openssl.org/source/openssl-3.0.7.tar.gz -O openssl-3.0.7.tar.gz +else + echo "Required Dependencies for download Nginx doesn't exist" +fi +tar xzf openssl-3.0.7.tar.gz + # Build Nginx cd ~/nginx_build if [[ -f "/usr/bin/curl" ]]; then - curl -L https://nginx.org/download/nginx-1.23.1.tar.gz --output nginx-1.23.1.tar.gz + curl -L https://nginx.org/download/nginx-1.23.2.tar.gz --output nginx-1.23.2.tar.gz elif [[ -f "/usr/bin/wget" ]]; then - wget https://nginx.org/download/nginx-1.23.1.tar.gz -O nginx-1.23.1.tar.gz + wget https://nginx.org/download/nginx-1.23.2.tar.gz -O nginx-1.23.2.tar.gz else echo "Required Dependencies for download Nginx doesn't exist" fi -tar xzf nginx-1.23.1.tar.gz && cd nginx-1.23.1 +tar xzf nginx-1.23.2.tar.gz && cd nginx-1.23.2 if [[ -f "/usr/bin/curl" ]]; then curl https://raw.githubusercontent.com/minoplhy/nginx-noroot/main/configure.sh | bash diff --git a/configure.sh b/configure.sh index 864e132..05ec9e3 100644 --- a/configure.sh +++ b/configure.sh @@ -13,6 +13,7 @@ User_home=~ --http-proxy-temp-path=$User_home/nginx-settings/temp/proxy \ --http-scgi-temp-path=$User_home/nginx-settings/temp/scgi \ --http-uwsgi-temp-path=$User_home/nginx-settings/temp/uwsgi \ +--with-openssl=$Build_directory/openssl-3.0.7 \ --with-compat \ --with-debug \ --with-http_ssl_module \ @@ -38,4 +39,4 @@ User_home=~ --with-stream_ssl_module \ --with-stream_ssl_preread_module \ --with-pcre=$Build_directory/pcre-8.45 \ ---with-zlib=$Build_directory/zlib-1.2.12 \ No newline at end of file +--with-zlib=$Build_directory/zlib-1.2.13 \ No newline at end of file