-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
45 lines (36 loc) · 1.04 KB
/
nginx.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
worker_processes 1;
error_log /dev/stdout info;
events {
worker_connections 1024;
}
http {
access_log /dev/stdout;
server {
listen 80;
# Use self-signed certificate in development mode. If it's production we do not
# require it because Cloudflare gives us free SSL/TLS encryption.
listen 443 ssl;
listen [::]:443 ssl;
server_name localhost;
ssl_certificate /etc/ssl/certs/selfsigned.crt;
ssl_certificate_key /etc/ssl/private/selfsigned.key;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
location /api/ {
proxy_pass http://backend:6000/;
}
location /socket.io/ {
# Configuration needed for socket.io to work.
#
# https://www.nginx.com/blog/nginx-nodejs-websockets-socketio/
#
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://frontend:3000;
}
location / {
proxy_pass http://frontend:3000;
}
}
}