abcd118q commited on
Commit
68dccbd
Β·
verified Β·
1 Parent(s): 585219d

Create nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +47 -0
nginx.conf ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ worker_processes auto;
2
+ error_log /tmp/nginx-error.log warn;
3
+ pid /tmp/nginx.pid;
4
+
5
+ events { worker_connections 1024; }
6
+
7
+ http {
8
+ include /etc/nginx/mime.types;
9
+ default_type application/octet-stream;
10
+
11
+ proxy_read_timeout 86400;
12
+ proxy_send_timeout 86400;
13
+ proxy_connect_timeout 10;
14
+
15
+ client_body_temp_path /tmp/nginx-client-body;
16
+ proxy_temp_path /tmp/nginx-proxy;
17
+ fastcgi_temp_path /tmp/nginx-fastcgi;
18
+ uwsgi_temp_path /tmp/nginx-uwsgi;
19
+ scgi_temp_path /tmp/nginx-scgi;
20
+
21
+ server {
22
+ listen 7860;
23
+
24
+ # ── /browser/ β†’ Playwright stealth browser ───────────────
25
+ location /browser/ {
26
+ proxy_pass http://127.0.0.1:8888/;
27
+ proxy_http_version 1.1;
28
+ proxy_set_header Upgrade $http_upgrade;
29
+ proxy_set_header Connection "upgrade";
30
+ proxy_set_header Host $http_host;
31
+ proxy_cache_bypass $http_upgrade;
32
+ }
33
+
34
+ # ── / β†’ code-server ──────────────────────────────────────
35
+ location / {
36
+ proxy_pass http://127.0.0.1:8080/;
37
+ proxy_http_version 1.1;
38
+ proxy_set_header Upgrade $http_upgrade;
39
+ proxy_set_header Connection "upgrade";
40
+ proxy_set_header Host $http_host;
41
+ proxy_set_header X-Real-IP $remote_addr;
42
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
43
+ proxy_set_header X-Forwarded-Proto $scheme;
44
+ proxy_cache_bypass $http_upgrade;
45
+ }
46
+ }
47
+ }