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=http://mockbin.org'
curl -i -X POST \
  --url http://localhost:8001/services/example-service/routes \
  --data 'hosts[]=example.com'
curl -i -X GET \
  --url http://localhost:8000/ \
  --header 'Host: example.com'

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
Host: example.com^M
^M
" while reading PROXY protocol, client: 127.0.0.1, server: 0.0.0.0:8000

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?)