Clone04 commited on
Commit
2d0dc1d
·
verified ·
1 Parent(s): 0a5dd2f

Create nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +37 -0
nginx.conf ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ worker_processes 1;
2
+
3
+ events {
4
+ worker_connections 1024;
5
+ }
6
+
7
+ http {
8
+ include mime.types;
9
+ default_type application/octet-stream;
10
+
11
+ # Brotli configuration (only if using Brotli module)
12
+ brotli on;
13
+ brotli_comp_level 6;
14
+ brotli_types text/plain text/css application/javascript application/json image/svg+xml;
15
+
16
+ sendfile on;
17
+ keepalive_timeout 65;
18
+
19
+ server {
20
+ listen 80;
21
+ server_name localhost;
22
+
23
+ # Static file serving (optional)
24
+ # root /usr/share/nginx/html;
25
+
26
+ location / {
27
+ # Example: reverse proxy to a backend app (e.g., Gradio or Flask)
28
+ proxy_pass http://host.docker.internal:7860;
29
+ proxy_set_header Host $host;
30
+ proxy_set_header X-Real-IP $remote_addr;
31
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
32
+ proxy_http_version 1.1;
33
+ proxy_set_header Upgrade $http_upgrade;
34
+ proxy_set_header Connection "upgrade";
35
+ }
36
+ }
37
+ }