worker_processes auto; pid /var/run/nginx.pid; events { worker_connections 1024; use epoll; multi_accept on; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $request_length $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" "$request_time"'; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log warn; # this is necessary for disabling request buffering in all cases proxy_http_version 1.1; keepalive_timeout 65; # some ceph/s3 URIs uses multiple slashes # merge consecutive slashes to single one (e.g. "/foo//bar" to "/foo/bar") # when forwarding requests will lead to 403 errors merge_slashes off; upstream radosgw { server 127.0.0.1:8080 max_fails=5; } server { listen 80; # disable any limits to avoid HTTP 413 for large image uploads client_max_body_size 0; location / { proxy_pass http://radosgw; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_buffering off; proxy_request_buffering off; } } }