-
Notifications
You must be signed in to change notification settings - Fork 59
/
nginx.conf
73 lines (60 loc) · 2.22 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
error_log /var/log/nginx/error.log;
events {
worker_connections 4096; ## Default: 1024
}
http {
#include /etc/nginx/proxy.conf;
server {
listen 80;
#server_name domain2.com www.domain2.com;
#access_log logs/domain2.access.log main;
location / {
proxy_pass http://127.0.0.1:4200/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header Referer $http_referer;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_max_temp_file_size 0;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
}
location ~ ^/(login/.+|complete|logout|api) {
set $protocol "http";
if ($http_x_arr_ssl){
set $protocol "https";
}
proxy_set_header X-Forwarded-Proto $protocol;
proxy_pass http://127.0.0.1:5000 ;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header Referer $http_referer;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_max_temp_file_size 0;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
}
}
server {
listen 5000;
#access_log logs/host.access.log main;
location / { try_files $uri @backend; }
location @backend {
include uwsgi_params;
uwsgi_pass unix:/app/Backend/uwsgi.sock;
}
}
}