blob: 1c51064062894b3c0367d3acc8c002c0668dfc52 (
plain)
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
|
server {
listen 443 ssl;
listen [::]:443 ssl; # For IPv6
http2 on;
server_name localhost; # Or your intranet domain if DNS is set up for it
# Self-signed certificates will be generated by the .install script
ssl_certificate /etc/ssl/certs/pxe-boot-admin/pxe-boot-admin.pem;
ssl_certificate_key /etc/ssl/private/pxe-boot-admin/pxe-boot-admin.key;
# ssl_protocols TLSv1.2 TLSv1.3;
# ssl_ciphers HIGH:!aNULL:!MD5; # Consider a more modern cipher suite
# ssl_prefer_server_ciphers off;
access_log /var/log/nginx/pxe-boot-admin-access.log combined;
error_log /var/log/nginx/pxe-boot-admin-error.log warn;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
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_cache_bypass $http_upgrade;
}
}
server {
listen 80;
listen [::]:80;
server_name localhost; # Or your intranet domain
# Redirect all HTTP traffic to HTTPS
return 301 https://$host$request_uri;
}
|