Emalawi19 commited on
Commit
b871f4d
·
verified ·
1 Parent(s): 03b48bb

Update nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +2 -5
nginx.conf CHANGED
@@ -1,11 +1,10 @@
1
  server {
2
- # Listen on Hugging Face's required port
3
  listen 7860 default_server;
4
  listen [::]:7860 default_server;
5
 
6
- root /var/www/html;
 
7
 
8
- # Prioritize PHP files
9
  index index.php index.html index.htm;
10
 
11
  server_name _;
@@ -14,13 +13,11 @@ server {
14
  try_files $uri $uri/ =404;
15
  }
16
 
17
- # Pass PHP scripts to FastCGI server
18
  location ~ \.php$ {
19
  include snippets/fastcgi-php.conf;
20
  fastcgi_pass unix:/run/php/php8.1-fpm.sock;
21
  }
22
 
23
- # Deny access to hidden files (like .htaccess)
24
  location ~ /\.ht {
25
  deny all;
26
  }
 
1
  server {
 
2
  listen 7860 default_server;
3
  listen [::]:7860 default_server;
4
 
5
+ # Look for files directly in the Hugging Face workspace root
6
+ root /app;
7
 
 
8
  index index.php index.html index.htm;
9
 
10
  server_name _;
 
13
  try_files $uri $uri/ =404;
14
  }
15
 
 
16
  location ~ \.php$ {
17
  include snippets/fastcgi-php.conf;
18
  fastcgi_pass unix:/run/php/php8.1-fpm.sock;
19
  }
20
 
 
21
  location ~ /\.ht {
22
  deny all;
23
  }