gaialive commited on
Commit
753e8d4
·
verified ·
1 Parent(s): b5d093d

Update nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +45 -45
nginx.conf CHANGED
@@ -1,45 +1,45 @@
1
- # A complete, minimal nginx.conf for restricted environments like Hugging Face Spaces
2
-
3
- # Set a writable PID path.
4
- pid /tmp/nginx.pid;
5
-
6
- # Run a single worker process.
7
- worker_processes 1;
8
-
9
-
10
- events {
11
- worker_connections 1024;
12
- }
13
-
14
- http {
15
- # Log errors and access to stdout/stderr to avoid file permission issues.
16
- # This is the correct context for these directives.
17
- error_log /dev/stderr warn;
18
- access_log /dev/stdout;
19
-
20
- include /etc/nginx/mime.types;
21
- default_type application/octet-stream;
22
-
23
- server {
24
- listen 80;
25
- server_name localhost;
26
-
27
- # Set temporary paths to a writable directory
28
- client_body_temp_path /tmp/client_temp;
29
- proxy_temp_path /tmp/proxy_temp;
30
- fastcgi_temp_path /tmp/fastcgi_temp;
31
- uwsgi_temp_path /tmp/uwsgi_temp;
32
- scgi_temp_path /tmp/scgi_temp;
33
-
34
- location / {
35
- root /usr/share/nginx/html;
36
- index index.html index.htm;
37
- try_files $uri $uri/ /index.html;
38
- }
39
-
40
- error_page 500 502 503 504 /50x.html;
41
- location = /50x.html {
42
- root /usr/share/nginx/html;
43
- }
44
- }
45
- }
 
1
+ # A complete, minimal nginx.conf for restricted environments like Hugging Face Spaces
2
+
3
+ # Set a writable PID path.
4
+ pid /tmp/nginx.pid;
5
+
6
+ # Run a single worker process.
7
+ worker_processes 1;
8
+
9
+
10
+ events {
11
+ worker_connections 1024;
12
+ }
13
+
14
+ http {
15
+ # Log errors and access to stdout/stderr to avoid file permission issues.
16
+ # This is the correct context for these directives.
17
+ error_log /dev/stderr warn;
18
+ access_log /dev/stdout;
19
+
20
+ include /etc/nginx/mime.types;
21
+ default_type application/octet-stream;
22
+
23
+ server {
24
+ listen 8080;
25
+ server_name localhost;
26
+
27
+ # Set temporary paths to a writable directory
28
+ client_body_temp_path /tmp/client_temp;
29
+ proxy_temp_path /tmp/proxy_temp;
30
+ fastcgi_temp_path /tmp/fastcgi_temp;
31
+ uwsgi_temp_path /tmp/uwsgi_temp;
32
+ scgi_temp_path /tmp/scgi_temp;
33
+
34
+ location / {
35
+ root /usr/share/nginx/html;
36
+ index index.html index.htm;
37
+ try_files $uri $uri/ /index.html;
38
+ }
39
+
40
+ error_page 500 502 503 504 /50x.html;
41
+ location = /50x.html {
42
+ root /usr/share/nginx/html;
43
+ }
44
+ }
45
+ }