I am using ubuntu ec2 apache server hosting nodejs webapp and I am trying to use Lets-encrypt to get SSL certificate for my domain drugfair.org the problem is when I applying sudo certbot --apache get HTTP 01 challenge fail
Waiting for verification...
Challenge failed for domain drugfair.org
Challenge failed for domain www.drugfair.org
http-01 challenge for drugfair.org
http-01 challenge for www.drugfair.org
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: drugfair.org
Type: unauthorized
Detail: Invalid response from
http://drugfair.org/.well-known/acme-challenge/9hPXdeQ4ymWoNAoMtG0ewLzdQxljPMTuDUrTVBJWM7E
[18.***.*.**]: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta
charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>ReferenceError:
/var/www"
Domain: www.drugfair.org
Type: unauthorized
Detail: Invalid response from
http://www.drugfair.org/.well-known/acme-challenge/AYVcrbDpcp3ubI0P-pXp0wx_McMlGiopZOzJzhAqyQw
[18.***.*.**]: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta
charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>ReferenceError:
/var/www"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
but when I try to access my website from browser through
http://drugfair.org or through 18.***.*.**:3100/
it is accessible without reference errors but when I try to access my website from inside ec2 using this command
curl http://18.***.**.*:3100
gives me reference error