-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
61 lines (51 loc) · 1.46 KB
/
nginx.conf
File metadata and controls
61 lines (51 loc) · 1.46 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
events {
}
http {
error_log /etc/nginx/error_log.log warn;
client_max_body_size 20m;
proxy_cache_path /etc/nginx/cache keys_zone=one:500m max_size=1000m;
# map $subdomain $subdomain_port {
# app 5001;
# mktg 5002;
# }
server {
listen 80;
server_name mit.loc;
root /test;
location / {
proxy_set_header Host $host;
index index.html;
}
}
server {
listen 80;
server_name app.mit.loc;
root ../Projects/a2t6/a2t;
location / {
# ... various proxy headers, then ...
proxy_set_header Host $host;
# proxy_pass http://localhost:5001; this won't work for a dockerized nginx as the docker container cant access the host's localhost
proxy_pass http://host.docker.internal:5000;
proxy_redirect off;
}
}
server {
listen 80;
server_name mktg.mit.loc;
location / {
# ... various proxy headers, then ...
proxy_set_header Host $host;
proxy_pass http://host.docker.internal:5002;
proxy_redirect off;
}
}
server {
listen 80;
server_name admin.mit.loc;
location / {
proxy_set_header Host $host;
proxy_pass http://host.docker.internal:5003;
proxy_redirect off;
}
}
}