Nginx-02-Nginx Ubuntu 安装 + windows10 + WSL ubuntu 安装 nginx 实战笔记

windows10 + WSL ubuntu 安装 nginx 实战笔记

在Ubuntu上安装Nginx通常是一个相对简单的过程。你可以通过以下步骤进行安装:

  1. 打开终端。
  2. 运行以下命令以更新系统的软件包列表:
sudo apt update
  1. 安装Nginx:
sudo apt install nginx
  1. 安装完成后,可以使用以下命令启动Nginx服务:
sudo systemctl start nginx
  1. 如果你希望Nginx在系统启动时自动启动,可以运行以下命令:
sudo systemctl enable nginx

现在,Nginx已经安装并运行在你的Ubuntu系统上。你可以通过在浏览器中输入服务器的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 href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">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 实战笔记

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 动态配置上游服务器

Nginx R31 doc-06-Accepting the PROXY Protocol

Nginx R31 doc-07-内容缓存

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

Nginx R31 doc-09-Serving Static Content 静态内容

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

Nginx R31 doc-11-Compression and Decompression 压缩与解压缩

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

  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值