Update nginx.conf
Browse files- nginx.conf +6 -3
nginx.conf
CHANGED
@@ -70,16 +70,19 @@ http {
|
|
70 |
|
71 |
root /var/www/example.com;
|
72 |
index index.html;
|
73 |
-
location
|
74 |
-
proxy_pass http://127.0.0.1:5050;
|
75 |
proxy_http_version 1.1;
|
76 |
proxy_set_header Upgrade $http_upgrade;
|
77 |
proxy_set_header Connection "Upgrade";
|
78 |
proxy_set_header Host $host;
|
79 |
proxy_read_timeout 86400;
|
80 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
|
|
81 |
}
|
82 |
-
|
|
|
83 |
location / {
|
84 |
proxy_pass http://127.0.0.1:3000;
|
85 |
proxy_http_version 1.1;
|
|
|
70 |
|
71 |
root /var/www/example.com;
|
72 |
index index.html;
|
73 |
+
location /codeserver/ {
|
|
|
74 |
proxy_http_version 1.1;
|
75 |
proxy_set_header Upgrade $http_upgrade;
|
76 |
proxy_set_header Connection "Upgrade";
|
77 |
proxy_set_header Host $host;
|
78 |
proxy_read_timeout 86400;
|
79 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
80 |
+
proxy_redirect off;
|
81 |
+
rewrite ^/codeserver/(.*) /$1 break;
|
82 |
+
proxy_pass http://127.0.0.1:5050;
|
83 |
}
|
84 |
+
|
85 |
+
error_page 502 = /codeserver;
|
86 |
location / {
|
87 |
proxy_pass http://127.0.0.1:3000;
|
88 |
proxy_http_version 1.1;
|