# Main nginx configuration for Flashpoint Web Frontend # Optimized for Docker container running as non-root user # Don't use 'user' directive when running as non-root # worker_processes auto is fine for most cases worker_processes auto; # Log to stdout/stderr for Docker (no file permission issues) error_log /dev/stderr warn; # PID file location (must be writable by non-root user) pid /tmp/nginx.pid; events { worker_connections 1024; use epoll; multi_accept on; } http { # Hide nginx version in headers and error pages server_tokens off; # Include mime types include /etc/nginx/mime.types; default_type application/octet-stream; # Logging to stdout for Docker log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /dev/stdout main; # Performance optimizations sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # Temp directories (must be writable by non-root user) client_body_temp_path /tmp/client_temp; proxy_temp_path /tmp/proxy_temp; fastcgi_temp_path /tmp/fastcgi_temp; uwsgi_temp_path /tmp/uwsgi_temp; scgi_temp_path /tmp/scgi_temp; # Include server configurations include /etc/nginx/conf.d/*.conf; }