-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
34 lines (32 loc) · 1.07 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
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log debug;
events {}
http {
# Nginx reverse proxy served on port 80
server {
listen 80;
location / {
# Route frontend angular app
proxy_intercept_errors on;
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_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_pass http://angular:4200/;
}
location ~ ^/(api) {
# Route api requests to express server
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_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
include uwsgi_params;
proxy_pass http://express:8080;
}
}
}