server { listen 8080; listen [::]:8080 ipv6only=on; server_name localhost; access_log off; location = /i { if ($http_content_type = "text/ping") { return 404; } proxy_pass http://countly-api:3001; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; } location ^~ /i/ { if ($http_content_type = "text/ping") { return 404; } proxy_pass http://countly-api:3001; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; } location = /o { if ($http_content_type = "text/ping") { return 404; } proxy_pass http://countly-api:3001; } location ^~ /o/ { if ($http_content_type = "text/ping") { return 404; } proxy_pass http://countly-api:3001; } location / { if ($http_content_type = "text/ping") { return 404; } proxy_pass http://countly-frontend:6001; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; } }