[V2][Centos] Caddy2 won't bind to ipv4 ports 80 & 443

1. Caddy version (caddy version):

v2.0.0 h1:pQSaIJGFluFvu8KDGDODV8u4/QRED/OPyIR+MWYYse8=

2. How I run Caddy:

I followed the official install page for caddy v2 for centos 7.

a. System environment:

Centos 7

b. Command:

service caddy start

d. My complete Caddyfile or JSON config:

vincentmaldonado.fr,
www.vincentmaldonado.fr {
        root * /var/www/vincentmaldonado.fr/htdocs
        file_server
        encode gzip
}

3. The problem I’m having:

Caddy won’t bind to ipv4 :80 & :443 :

tcp        0      0 127.0.0.1:2019          0.0.0.0:*               LISTEN      18696/caddy
tcp6       0      0 :::80                   :::*                    LISTEN      18696/caddy
tcp6       0      0 :::443                  :::*                    LISTEN      18696/caddy

4. Error messages and/or full log output:

No error message.

5. What I already tried:

Some port opening or privileges escalation SElinux related, without any result.

Edit : As seen on another topic here, I tried binding to the specific ipv4 of my server with no success.

Would this also be on a Linode-host?

It’s on Scaleway.

try first just;

vincentmaldonado.fr {
        root * /var/www/vincentmaldonado.fr/htdocs
        file_server
        encode gzip
}

Then restart the caddy service and then check.

Nothing worked, I used Debian without problems now.

Can this topic be closed ?

Did you try setenforce 0 in CentOS?

This topic was automatically closed after 30 days. New replies are no longer allowed.