user  nginx;
worker_processes auto;

# Send logs to container fds (works regardless of privileges)
error_log  /proc/self/fd/2 warn;
pid        /run/nginx/nginx.pid;

events {
    worker_connections 1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    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  /proc/self/fd/1  main;
    # (No extra error_log here; the top-level one above is enough)

    sendfile        on;
    keepalive_timeout  65;

    # Include vhosts (your Laravel server block lives in one of these)
    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/http.d/*.conf;
}
