-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx_mazesolver.conf
More file actions
46 lines (35 loc) · 1.21 KB
/
nginx_mazesolver.conf
File metadata and controls
46 lines (35 loc) · 1.21 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
46
#/etc/nginx/conf.d/nginx_mazesolver.conf
server {
listen 80;
server_name mazesolver.party
return 301 https://$server_name$request_uri;
root /home/pi/opencv-mazesolver/src/httpdocs;
index index.html;
}
server {
listen 443 http2;
server_name mazesolver.party;
rewrite ^/(.*)/$ /$1 permanent;
root /home/pi/opencv-mazesolver/src/httpdocs;
index index.html;
location /liveimage {
proxy_pass http://127.0.0.1:9001/?action=stream;
}
location /ws {
proxy_pass http://127.0.0.1:9002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
error_log /etc/nginx/logs/error.log;
gzip on;
gzip_vary on;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;
gzip_comp_level 4;
ssl on;
ssl_certificate /etc/letsencrypt/live/mazesolver.party/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mazesolver.party/privkey.pem;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_ciphers HIGH:!aNULL:!MD5:!RC4;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
}