1. 程式人生 > >ubantu 安裝nginx HTTP反向代理伺服器

ubantu 安裝nginx HTTP反向代理伺服器

  

 
Nginx發音的“engine x”是一個免費的開源高效能HTTP和反向代理伺服器,負責處理網際網路上一些最大的網站的負載。 本教程將概述在Ubuntu 18.04機器上安裝和管理Nginx的步驟。

安裝Nginx

Nginx的軟體包在Ubuntu預設軟體倉庫中可用。 安裝非常簡單,只需鍵入以下命令:

sudo apt update
sudo apt install nginx

安裝完成後,請檢查Nginx服務的狀態和版本:

[email protected]:~$ sudo systemctl status nginx
[sudo] linuxidc 的密碼:

輸出:

● nginx.service 
- A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en Active: active (running) since Sat 2018-05-05 21:54:25 CST; 1 day 7h ago Docs: man:nginx(8) Main PID: 2188 (nginx) Tasks: 5 (limit: 4471) CGroup: /system.slice/nginx.service ├─
2188 nginx: master process /usr/sbin/nginx -g daemon on; master_pro ├─2189 nginx: worker process ├─2190 nginx: worker process ├─2191 nginx: worker process └─2192 nginx: worker process 5月 05 21:54:17 linuxidc systemd[1]: Starting A high performance web server and
5月 05 21:54:24 linuxidc nginx[2032]: nginx: [warn] conflicting server name "lin 5月 05 21:54:25 linuxidc nginx[2187]: nginx: [warn] conflicting server name "lin 5月 05 21:54:25 linuxidc systemd[1]: Started A high performance web server and a