cse2000-software-project/nginx.conf

43 lines
1.3 KiB
Nginx Configuration File

events {
worker_connections 1024;
}
http {
# Enables log and error files
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Defines the server listening on port 80 for HTTP requests
server {
listen 80;
# Configuration for the app service
location / {
proxy_pass http://app:5173; # Proxies requests to the app service
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
client_max_body_size 100M; # Allows file uploads up to 100MB
}
# Configuration for the kernel service
location /api/ {
proxy_pass http://kernel:8000; # Proxies requests to the kernel service
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location ^~ /log/ {
proxy_pass http://log:8080;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}
}
}