Nginx-02-Nginx Ubuntu 安裝 + windows10 + WSL ubuntu 安裝 nginx 實戰(zhàn)筆記

windows10 + WSL ubuntu 安裝 nginx 實戰(zhàn)筆記

在Ubuntu上安裝Nginx通常是一個相對簡單的過程。你可以通過以下步驟進行安裝:

  1. 打開終端。
  2. 運行以下命令以更新系統(tǒng)的軟件包列表:
sudo apt update
  1. 安裝Nginx:
sudo apt install nginx
  1. 安裝完成后,可以使用以下命令啟動Nginx服務:
sudo systemctl start nginx
  1. 如果你希望Nginx在系統(tǒng)啟動時自動啟動,可以運行以下命令:
sudo systemctl enable nginx

現(xiàn)在,Nginx已經(jīng)安裝并運行在你的Ubuntu系統(tǒng)上。你可以通過在瀏覽器中輸入服務器的IP地址或域名來驗證是否成功安裝。

如果一切順利,你應該能夠看到Nginx的歡迎頁面。

  1. 驗證方式

瀏覽器的話,可以看到對應的歡迎頁面。

$ curl http://localhost

<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a >nginx.org</a>.<br/>
Commercial support is available at
<a >nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

拓展閱讀

Nginx-01-聊一聊 nginx

Nginx-01-Nginx 是什么

Nginx-02-為什么使用 Nginx

Nginx-02-Nginx Ubuntu 安裝 + windows10 + WSL ubuntu 安裝 nginx 實戰(zhàn)筆記

Nginx-02-基本使用

Nginx-03-Nginx 項目架構

Nginx-04-Docker Nginx

Nginx-05-nginx 反向代理是什么?windows 下如何配置使用 nginx

Nginx-06-nginx 匯總入門介紹

Nginx R31 doc 官方文檔-01-nginx 如何安裝

Nginx R31 doc-02-nginx 基本功能

Nginx R31 doc-03-HTTP Load Balancing HTTP 負載均衡

Nginx R31 doc-04-HTTP Health Checks

Nginx R31 doc-05-Dynamic Configuration of Upstreams with the NGINX Plus API 使用 NGINX Plus API 動態(tài)配置上游服務器

Nginx R31 doc-06-Accepting the PROXY Protocol

Nginx R31 doc-07-內(nèi)容緩存

Nginx R31 doc-08-Configuring NGINX and NGINX Plus as a Web Server 配置 NGINX 和 NGINX Plus 作為 Web 服務器

Nginx R31 doc-09-Serving Static Content 靜態(tài)內(nèi)容

Nginx R31 doc-10-NGINX Reverse Proxy 反向代理

Nginx R31 doc-11-Compression and Decompression 壓縮與解壓縮

Nginx R31 doc-12-NGINX SSL Termination 安全加密

?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容