llm-chatbot/nginx/nginx.conf
2025-09-14 17:15:48 +00:00

52 lines
1.2 KiB
Nginx Configuration File

user nginx;
worker_processes auto;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/conf.d/*.conf;
server {
listen 80;
server_name llm.byte-mate.xyz;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name llm.byte-mate.xyz;
ssl_certificate /etc/letsencrypt/live/llm.byte-mate.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/llm.byte-mate.xyz/privkey.pem;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
try_files $uri /index.html;
}
location /api/ {
proxy_pass http://web:8000;
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;
}
}
}