forked from aerabi/events
-
Notifications
You must be signed in to change notification settings - Fork 6
/
nginx.conf
34 lines (32 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
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log debug;
events {}
http {
server {
listen 80;
location / {
# Route frontend stuff
error_page 404 /;
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://frontend:80/;
}
location ~ ^/(api) {
# Route api requests to api 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://backend:8000;
}
}
}