Show More
@@ -1,47 +1,49 b'' | |||
|
1 | 1 | .. _nginx-proxy-conf: |
|
2 | 2 | |
|
3 | 3 | Nginx Proxy Config |
|
4 | 4 | ------------------ |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | Set the following properties in your ``/etc/nginx/proxy.conf`` so it does not |
|
8 | 8 | timeout during large pushes. |
|
9 | 9 | |
|
10 | 10 | .. code-block:: nginx |
|
11 | 11 | |
|
12 | 12 | proxy_redirect off; |
|
13 | 13 | proxy_set_header Host $http_host; |
|
14 | 14 | |
|
15 | 15 | ## If you use HTTPS make sure you disable gzip compression |
|
16 | 16 | ## to be safe against BREACH attack. |
|
17 | 17 | gzip off; |
|
18 | 18 | |
|
19 | 19 | # Don't buffer requests in NGINX stream them using chunked-encoding |
|
20 | 20 | proxy_buffering off; |
|
21 | 21 | |
|
22 | 22 | ## This is also required for later GIT to use streaming. |
|
23 | 23 | ## Works only for Nginx 1.7.11 and newer |
|
24 | 24 | proxy_request_buffering off; |
|
25 | 25 | proxy_http_version 1.1; |
|
26 | 26 | |
|
27 | 27 | ## Set this to a larger number if you experience timeouts |
|
28 | 28 | ## or 413 Request Entity Too Large, 10GB is enough for most cases |
|
29 | 29 | client_max_body_size 10240m; |
|
30 | 30 | |
|
31 | 31 | ## needed for container auth |
|
32 | 32 | # proxy_set_header REMOTE_USER $remote_user; |
|
33 | 33 | # proxy_set_header X-Forwarded-User $remote_user; |
|
34 | 34 | |
|
35 | 35 | proxy_set_header X-Url-Scheme $scheme; |
|
36 | 36 | proxy_set_header X-Host $http_host; |
|
37 | 37 | proxy_set_header X-Real-IP $remote_addr; |
|
38 | 38 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
39 | proxy_set_header X-Forwarded-Proto $proto; | |
|
40 | proxy_set_header X-Url-Scheme $scheme; | |
|
39 | 41 | proxy_set_header Proxy-host $proxy_host; |
|
40 | 42 | |
|
41 | 43 | proxy_connect_timeout 7200; |
|
42 | 44 | proxy_send_timeout 7200; |
|
43 | 45 | proxy_read_timeout 7200; |
|
44 | 46 | proxy_buffers 8 32k; |
|
45 | 47 | |
|
46 | 48 | add_header X-Frame-Options SAMEORIGIN; |
|
47 | 49 | add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; |
General Comments 0
You need to be logged in to leave comments.
Login now