【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 解决问题

浙公网安备 33010602011771号