【NGINX】浅尝

Introduction

Nginx is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache.

Nginx是可以用于反向代理,负载均衡,邮件代理和HTTP缓存的Web服务器

Installation

ubuntu:

sudo apt install nginx

查看状态

systemctl status nginx

管理

sudo systemctl stop nginx

sudo systemctl start nginx

sudo systemctl restart nginx

sudo systemctl reload nginx  #configuration changed
sudo nginx -s reload

sudo systemctl disable nginx #disable the behavior of starting automatically when the server boots

sudo systemctl enable nginx

Terminology

  • context

    events {
    	...
    }
    
  • directive

    worker_connections 768;
    

    context内的键值对

Load Balance


Bugs

css text/plain

NGINX: CSS was not loaded because its MIME type, "text/plain", is not "text/css"

修改为

后仍未加载

原因为浏览器缓存

Ctrl+Shift+R hard reload 解决问题

posted @   纳西瑟斯  阅读(29)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· Qt个人项目总结 —— MySQL数据库查询与断言
点击右上角即可分享
微信分享提示