web / nginx.conf
Chandima Prabhath
Add Dockerfile and Nginx configuration for React application deployment
74791b6
raw
history blame
609 Bytes
worker_processes 1;
events { worker_connections 1024; }
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 7860;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Serve files, fallback to index.html for client‑side routing
location / {
try_files $uri $uri/ /index.html;
}
# Optional: caching static assets
location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico)$ {
expires 30d;
add_header Cache-Control "public";
}
}
}