File size: 921 Bytes
79278ec
8fbfd3a
79278ec
e2036e6
 
 
 
d248375
79278ec
e2036e6
79278ec
1f60a7d
e2036e6
 
1f60a7d
 
 
 
e2036e6
1f60a7d
e2036e6
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
server {
    listen 7860;

    # Указываем корневую директорию для фронтенда
    root /home/pn/app;
    index index.html;
    server_name _;

    location / {
        try_files $uri /index.html;
    }

    # Проксируем API-запросы на бекенд
    location /api/ {
        proxy_pass https://muryshev-generic-chatbot-backend.hf.space;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    # Указываем пути к временным директориям Nginx
    client_body_temp_path /tmp/nginx/client_temp;
    proxy_temp_path /tmp/nginx/proxy_temp;
    fastcgi_temp_path /tmp/nginx/fastcgi_temp;
    uwsgi_temp_path /tmp/nginx/uwsgi_temp;
    scgi_temp_path /tmp/nginx/scgi_temp;
}