-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault
48 lines (43 loc) · 1.47 KB
/
default
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
46
47
48
# =====================================================================
# File: default
# Description:
# This NGINX configuration is part of a high-availability cluster setup
# for the 'HArmadillium' project. It includes:
# - HTTP to HTTPS redirection (port 80).
# - HTTPS configuration, including SSL certificates and proxy settings.
# - Timeout and header settings for WebSocket support.
# - Enhanced with HTTP/2 for better performance and efficiency.
# Server: armadillium01
# =====================================================================
#armadillium01 192.168.1.141
server {
listen 80;
listen [::]:80;
server_name armadillium01;
return 301 https://$host$request_uri;
}
upstream websocket {
server 192.168.1.140;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name armadillium01;
root /usr/share/nginx/html;
ssl_certificate /etc/nginx/ssl/host.cert;
ssl_certificate_key /etc/nginx/ssl/host.key;
location / {
proxy_buffers 8 32k;
proxy_buffer_size 64k;
proxy_pass http://websocket;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
#proxy_http_version 2.0;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
}