1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
7 server_name localhost-api;
9 root /var/www/arvados-api/current/public;
10 index index.html index.htm index.php;
13 # If you're using RVM, uncomment the line below.
14 passenger_ruby /usr/local/rvm/wrappers/default/ruby;
16 # This value effectively limits the size of API objects users can
17 # create, especially collections. If you change this, you should
18 # also ensure the following settings match it:
19 # * `client_max_body_size` in the server section below
20 # * `client_max_body_size` in the Workbench Nginx configuration (twice)
21 # * `max_request_size` in the API server's application.yml file
22 client_max_body_size 128m;
26 server 127.0.0.1:8000 fail_timeout=10s;
29 proxy_http_version 1.1;
31 # When Keep clients request a list of Keep services from the API server, the
32 # server will automatically return the list of available proxies if
33 # the request headers include X-External-Client: 1. Following the example
34 # here, at the end of this section, add a line for each netmask that has
35 # direct access to Keep storage daemons to set this header value to 0.
36 geo $external_client {
42 listen 0.0.0.0:444 ssl;
43 server_name public-api;
46 ssl_certificate /etc/ssl/certs/api-server.pem;
47 ssl_certificate_key /etc/ssl/private/api-server.key;
49 index index.html index.htm index.php;
51 # Refer to the comment about this setting in the server section above.
52 client_max_body_size 128m;
55 proxy_pass http://api;
57 proxy_connect_timeout 90s;
58 proxy_read_timeout 300s;
60 proxy_set_header X-Forwarded-Proto https;
61 proxy_set_header Host $http_host;
62 proxy_set_header X-External-Client $external_client;
63 proxy_set_header X-Real-IP $remote_addr;
64 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;