-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx-vhost.conf
45 lines (35 loc) · 1.52 KB
/
nginx-vhost.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
server {
listen {{ opencast_opensearch_remote_port | int }} ssl http2;
listen [::]:{{ opencast_opensearch_remote_port | int }} ssl http2;
server_name {{ opencast_opensearch_remote_host }};
ssl_certificate_key /etc/nginx/ssl/{{ opencast_opensearch_remote_host }}.key;
ssl_certificate /etc/nginx/ssl/{{ opencast_opensearch_remote_host }}.crt;
# Additional TLS related Nginx options
include /etc/nginx/conf.d/tls.conf;
# Access log settings.
access_log off;
#access_log /var/log/nginx/opensearch_access.log;
# Accept large ingests
client_max_body_size 0;
# Proxy configuration for Opencast
location / {
auth_basic "Authentication required";
auth_basic_user_file /etc/nginx/opensearch_htpasswd;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-SSL "on";
proxy_pass http://{{ opencast_opensearch_api_host if opencast_opensearch_api_host != "0.0.0.0" else "127.0.0.1" }}:{{ opencast_opensearch_api_port | int }};
# Do not buffer responses
proxy_buffering off;
# Do not buffer requests
proxy_request_buffering off;
# Timeout for reading a response from the proxied server (OpenSearch)
proxy_read_timeout 600;
# Timeout for transmitting a request to the proxied server (OpenSearch)
proxy_send_timeout 300;
# Timeout for transmitting a response to the client
send_timeout 300;
}
}