首頁文件分類網站建置CentOSCentOS 7.x 編譯安裝 nginx
CentOS 7.x 編譯安裝 nginx

nginx news

https://nginx.org/


nginx: download

https://nginx.org/en/download.html


下載 nginx
cd /usr/local/src
lynx http://nginx.org/download/nginx-1.14.2.tar.gz

安裝 nginx
tar zxf nginx-1.14.2.tar.gz
cd nginx-1.14.2
./configure --prefix=/usr/local/nginx --with-threads --with-pcre --with-http_ssl_module --with-http_v2_module
make
make install
make clean

設定 nginx
vi /usr/local/nginx/conf/nginx.conf
vi /usr/local/nginx/conf/fastcgi.conf
vi /usr/local/nginx/conf/fastcgi_params
vi /usr/local/nginx/conf/uwsgi_params
測試 nginx
/usr/local/nginx/sbin/nginx -t
啟動 nginx
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
停止 nginx
/usr/local/nginx/sbin/nginx -s stop
/usr/local/nginx/sbin/nginx -s quit
重啟 nginx
/usr/local/nginx/sbin/nginx -s reload
預設目錄

/usr/local/nginx/html

首頁文件分類網站建置CentOSCentOS 7.x 編譯安裝 nginx