Curl localhost:8000 giving Curl: (52) Empty reply from server

I just tried this:

curl -i -X POST \
  --url http://localhost:8001/services/ \
  --data 'name=example-service' \
  --data 'url='
curl -i -X POST \
  --url http://localhost:8001/services/example-service/routes \
  --data 'hosts[]'
curl -i -X GET \
  --url http://localhost:8000/ \
  --header 'Host:'

But it gives empty response from server.

curl: (52) Empty reply from server

Error logs (/usr/local/kong/logs/error.log) shows:

2019/05/10 09:24:36 [error] 1797#0: *69689 broken header: "GET / HTTP/1.1^M
User-Agent: curl/7.29.0^M
Accept: */*^M
" while reading PROXY protocol, client:, server:

NOTE: curl localhost:8001 (kong admin api) is working fine.

Please help here what am I missing.

I just modified few things in kong.conf.
In proxy_admin added proxy_protocol.
And pointed to correct postgres instance.

On a vanilla install of Kong (no modification of kong.conf) I cannot recreate your issue. I’m also unable to track down any proxy_admin in the configuration options.
Can you: a) try without the setting?
b) show exactly what you’ve changed (and perhaps explain why that change is needed?)