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