Ramses II
commited on
Commit
•
2108791
1
Parent(s):
7950999
auto msg
Browse files- nginx.conf +30 -5
nginx.conf
CHANGED
@@ -1,17 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
http {
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
server {
|
3 |
-
listen
|
4 |
-
server_name
|
5 |
|
|
|
6 |
location / {
|
7 |
root /app/public;
|
8 |
-
|
9 |
}
|
10 |
|
|
|
11 |
location /jupyter/ {
|
12 |
-
proxy_pass http://
|
13 |
proxy_set_header Host $host;
|
14 |
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
|
|
|
|
|
|
16 |
}
|
17 |
-
}
|
|
|
1 |
+
pid /tmp/nginx.pid;
|
2 |
+
worker_processes 1;
|
3 |
+
|
4 |
+
events {
|
5 |
+
worker_connections 1024;
|
6 |
+
}
|
7 |
+
|
8 |
http {
|
9 |
+
include mime.types;
|
10 |
+
default_type application/octet-stream;
|
11 |
+
|
12 |
+
sendfile on;
|
13 |
+
keepalive_timeout 65;
|
14 |
+
|
15 |
server {
|
16 |
+
listen 7860;
|
17 |
+
server_name localhost;
|
18 |
|
19 |
+
# Serve static files from /app/public
|
20 |
location / {
|
21 |
root /app/public;
|
22 |
+
try_files $uri $uri/ =404;
|
23 |
}
|
24 |
|
25 |
+
# Proxy JupyterLab to /jupyter/
|
26 |
location /jupyter/ {
|
27 |
+
proxy_pass http://127.0.0.1:8888;
|
28 |
proxy_set_header Host $host;
|
29 |
proxy_set_header X-Real-IP $remote_addr;
|
30 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
31 |
+
proxy_set_header X-Forwarded-Proto $scheme;
|
32 |
+
|
33 |
+
# WebSocket support
|
34 |
+
proxy_http_version 1.1;
|
35 |
+
proxy_set_header Upgrade $http_upgrade;
|
36 |
+
proxy_set_header Connection "upgrade";
|
37 |
}
|
38 |
+
|
39 |
+
error_log /tmp/nginx_error.log;
|
40 |
+
access_log /tmp/nginx_access.log;
|
41 |
}
|
42 |
+
}
|