Skip to content

Commit

Permalink
nginx架构和安装
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayZhu1024 committed Jul 3, 2024
1 parent 1fbd3ab commit 0416e65
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions nginx/5.nginx的常见模块.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,31 @@ location /about {

```

## 自定义错误页面 error_page

自定义错误页,同时也可以用指定的响应状态码进行响应, 可用位置:http, server, location, if in location
```bash
Syntax: error_page code ... [=[response]] uri;
Default: —
Context: http, server, location, if in location


listen 80;
server_name www.wang.org;
error_page  500 502 503 504 /error.html;
location = /error.html {
  root /data/nginx/html;
}


#404转为302
#error_page 404 /index.html;
error_page  404  =302 /index.html;
error_page 500 502 503 504 /50x.html;
    location = /50x.html {
}

```

0 comments on commit 0416e65

Please sign in to comment.