Skip to content

Commit

Permalink
update nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Aug 3, 2017
1 parent 3d03681 commit d26d015
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions CentOS/CentOS7安装维护Nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ Nginx版本:`1.11.5`
- [监控](#监控)
- [常见使用场景](#常见使用场景)
- [跨域问题](#跨域问题)
- [跳转到带www的域上面](#跳转到带www的域上面)
- [跳转到带www的域上面](#跳转到带www的域上面)
- [代理转发](#代理转发)
- [代理转发连接替换](#代理转发连接替换)
- [ssl配置](#ssl配置)
- [两个虚拟主机](#两个虚拟主机)
- [虚拟主机标准配置](#虚拟主机标准配置)
Expand Down Expand Up @@ -945,7 +946,7 @@ server {
}
```

#### 跳转到带www的域上面
### 跳转到带www的域上面

```nginx
server {
Expand All @@ -967,8 +968,6 @@ server {

### 代理转发

我有一些需求,需要搭建一个静态服务,路由在前端,前端请求API,需要到代理到API服务器,图片资源需要代理到图片资源服务器。

```nginx
upstream server-api{
# api 代理服务地址
Expand Down Expand Up @@ -1006,6 +1005,16 @@ server {
}
```

### 代理转发连接替换

```
location ^~/api/upload {
rewrite ^/(.*)$ /wfs/v1/upload break;
proxy_pass http://wfs-api;
}
```

### ssl配置

超文本传输安全协议(缩写:HTTPS,英语:Hypertext Transfer Protocol Secure)是超文本传输协议和SSL/TLS的组合,用以提供加密通讯及对网络服务器身份的鉴定。HTTPS连接经常被用于万维网上的交易支付和企业信息系统中敏感信息的传输。HTTPS不应与在RFC 2660中定义的安全超文本传输协议(S-HTTP)相混。
Expand Down

0 comments on commit d26d015

Please sign in to comment.