nginx常用配置

1. 常用配置 1. 标准root页面配置 1 2 3 4 5 6 7 8 9 10 11 12 server { listen 80; server_name 127.0.0.1; client_max_body_size 100m; location / { root /app/xxx; # 项目所在目录 index index.html index.htm; try_files $uri $uri/ /index.html; # vue单页应用需要路由始终指 Continue reading

nginx常用命令

1. 安装 1. windows系统 去到nginx官网下载页下载对应版本即可 2. MaxOS系统 1 brew install nginx 3. Linux系统 * 通过rpm镜像源安装 1 2 rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm yum install -y nginx * 手动解压安装 1 2 3 4 5 6 7 8 9 10 yum install pcre pcre-devel Continue reading

nginx了解

1. nginx 默认配置文件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ... #全局块 events { #events块 ... } http #http块 { ... #http全局块 server #server块 { ... #server全局块 location [PATTERN] #location块 { Continue reading