-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathnginx.conf
More file actions
46 lines (38 loc) · 1.26 KB
/
nginx.conf
File metadata and controls
46 lines (38 loc) · 1.26 KB
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
# Nginx config for Panorama
# Peter Ramm, 22.03.2019
events {
}
http {
# Redirect all http traffic on port 80 to https 443
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
server {
server_name _;
listen 443 ssl;
ssl_certificate /etc/nginx/ssl_certificates/mycert.pem;
ssl_certificate_key /etc/nginx/ssl_certificates/mycert.key;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DHE+AES128:!ADH:!AECDH:!MD5;
# Redirect ../Panorama to docker container with IP-Address panorama
location /Panorama {
proxy_pass http://panorama:8080;
# Set header to prevent "HTTP Origin header didn't match request.base_url"
proxy_set_header Host $host;
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; # Optional
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# Redirect call on root to ../Panorama
location / {
return 301 https://$host;
}
}
}