---
title: "nginx proxy_http_version"
author: "sw1982"
date: "2014-01-07T16:10:24Z"
tags: []
categories: ["Web前端"]
slug: "nginx-proxy-http-version"
draft: false
lastmod: "2014-01-07T16:10:24Z"
id: 2000413
url: "https://sw1982.iteye.com/blog/2000413"
---

nginx转 apache ，发现HTTP协议版本 从1.1 变成了1.0

 

其实并非某些人说的不支持1.1，而是有个参数，默认为1.0而已。

```
NGINX

HTTP/1.1" 200 3578 0.035 "http://plugin/index.php/video/youku" "Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/11B554a" -


APACHE
HTTP/1.0" 200 3815 "http://plugin/index.php/video/youku" "Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/11B554a"
```

 [http://nginx.org/en/docs/http/ngx\_http\_proxy\_module.html#proxy\_http\_version](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version)

 

syntax: `proxy_http_version 1.0 | 1.1;` default:

```
proxy_http_version 1.0;
```

context: `http`, `server`, `location`

This directive appeared in version 1.1.4.

Sets the HTTP protocol version for proxying. By default, version 1.0 is used. Version 1.1 is recommended for use with [keepalive](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive) connections.