1. Caddy version (caddy version
):
v2.1.1 h1:X9k1+ehZPYYrSqBvf/ocUgdLSRIuiNiMo7CvyGUQKeA=
2. How I run Caddy:
caddy start
a. System environment:
AWS EC2 Ubuntu 18.04
b. Command:
Run server
caddy start
Load config
curl localhost:2019/load -H 'Content-Type: application/json' -d @config.json
c. Service/unit/compose file:
paste full file contents here
d. My complete Caddyfile or JSON config:
{
"admin": {
"disabled": false,
"enforce_origin": false,
"origins": ["localhost:2019","103.55.1.2:2019","54.190.1.2:2019"]
},
"apps": {
"HTTP": {
"servers": {
"scanning": {
"listen": [":443"],
"routes": [{
"handle": [{
"handler": "file_server",
"root": "/var/www/html/app-frontend"
}],
"match": [{
"host": ["caddy.example.com"]
}]
}]
}
}
}
}
}
Where the IP address
- 103.55.1.2: My ISP IP address
- 54.190.1.2: The EC2 private IP address
3. The problem I’m having:
I’m trying to get the config from the postman using the EC2 IP address but it does not work.
http://54.190.1.2:2019/config/
4. Error messages and/or full log output:
It gives Request Time out
in the Postman.
5. What I already tried:
I tried this solution
https://caddy.community/t/host-not-allowed-when-calling-the-api-remotely/7670/2?u=anujs