27
loading...
This website collects cookies to deliver better user experience
sudo apt-get install nginx
sudo yum install epel-release
sudo yum install nginx
ps aux | grep nginx
localhost
in the address bar and hit enter. You should see something similar to this:sudo service nginx start
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev
sudo yum groupinstall "Development Tools"
sudo yum install pcre pcre-devel zlib zlib-devel openssl openssl-devel
wget
and exctract the contents of the tar ball:wget http://nginx.org/download/nginx-1.21.0.tar.gz
tar -zxvf nginx-1.21.0.tar.gz
sudo ./configure --sbin-path=/usr/bin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-pcre --pid-path=/var/run/nginx.pid --with-http_ssl_module
sbin-path
: This is the path to the nginx executable fileconf-path
: Path to the configuration file that nginx will useerror-log-path
: Path to where error logs will get storedhttp-log-path
: Path to where access logs will get storedwith-pcre
: Enables support for using the system regular expression librarypid-path
: Comes in handy when you set nginx up as a system servicewith-https_ssl_module
: This is a bundled module that you can setup when installing from source, used for enabling https.configure
, you’ll want to runsudo make
sudo make install