Update nginx.conf
Browse files- nginx.conf +12 -7
nginx.conf
CHANGED
|
@@ -1,26 +1,31 @@
|
|
| 1 |
worker_processes auto;
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
http {
|
| 5 |
-
include
|
| 6 |
-
default_type
|
| 7 |
-
access_log /
|
| 8 |
-
error_log /dev/stderr notice;
|
| 9 |
|
| 10 |
server {
|
| 11 |
listen 7860;
|
| 12 |
server_name _;
|
| 13 |
|
| 14 |
-
#
|
| 15 |
location ~ ^/(console/api|api|v1|files|install) {
|
| 16 |
proxy_pass http://127.0.0.1:5001;
|
| 17 |
proxy_set_header Host $host;
|
| 18 |
proxy_set_header X-Real-IP $remote_addr;
|
| 19 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 20 |
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
| 21 |
}
|
| 22 |
|
| 23 |
-
#
|
| 24 |
location / {
|
| 25 |
proxy_pass http://127.0.0.1:3000;
|
| 26 |
proxy_set_header Host $host;
|
|
|
|
| 1 |
worker_processes auto;
|
| 2 |
+
pid /run/nginx.pid;
|
| 3 |
+
error_log /var/log/nginx/error.log warn;
|
| 4 |
+
|
| 5 |
+
events {
|
| 6 |
+
worker_connections 1024;
|
| 7 |
+
}
|
| 8 |
|
| 9 |
http {
|
| 10 |
+
include /etc/nginx/mime.types;
|
| 11 |
+
default_type application/octet-stream;
|
| 12 |
+
access_log /var/log/nginx/access.log;
|
|
|
|
| 13 |
|
| 14 |
server {
|
| 15 |
listen 7860;
|
| 16 |
server_name _;
|
| 17 |
|
| 18 |
+
# API routes -> Python (5001)
|
| 19 |
location ~ ^/(console/api|api|v1|files|install) {
|
| 20 |
proxy_pass http://127.0.0.1:5001;
|
| 21 |
proxy_set_header Host $host;
|
| 22 |
proxy_set_header X-Real-IP $remote_addr;
|
| 23 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 24 |
proxy_set_header X-Forwarded-Proto $scheme;
|
| 25 |
+
proxy_read_timeout 300;
|
| 26 |
}
|
| 27 |
|
| 28 |
+
# Everything else -> Node.js Web (3000)
|
| 29 |
location / {
|
| 30 |
proxy_pass http://127.0.0.1:3000;
|
| 31 |
proxy_set_header Host $host;
|