1. Caddy version (caddy version
):
v2.0.0 - Binaries for Linux amd64 manually downloaded or via apt-get
2. How I run Caddy:
a. System environment:
Ubuntu 16.04.06, systemd 229
b. Command:
caddy start
and
sudo caddy start
from user caddy and root (for testpurposes)
c. Service/unit/compose file:
Not ported to systemd229 yet. So none used.
d. My complete Caddyfile or JSON config:
80
bind 0.0.0.0
root * /usr/share/nginx/html
but also all other tries without using bind or using the tutorial files etc. are not working to connect with ipv4.
3. The problem I’m having:
I´m running a small vServer, for which I have a limited choice of OS due to my provider. This means an OS upgrade to a newer version is currently not possible. Because it’s the first full configuration of the server, I want to configure it directly to serve TLS v1.3, so I don’t have the problem to reconfigure / upgrade TLS v1.2 → TLS v1.3 in productive use later on. Therefore I found Caddy v2 as the solution. Now every configuration I tried to start Caddy with leads to the Problem that Caddy only connects to IPv6-Ports, except the Admin-Port 2019.
Currently no other tool is listening to Port 80 and 443, neither on IPv4 nor on IPv6.
Using nginx instead of caddy, will work correctly. But that is no option, cause of the TLS-“Problem”.
4. Error messages and/or full log output:
netstat -tulpn:
tcp 0 0 127.0.0.1:2019 0.0.0.0:* LISTEN 3963/caddy
tcp6 0 0 :::443 :::* LISTEN 3963/caddy
tcp6 0 0 :::80 :::* LISTEN 3963/caddy
5. What I already tried:
I´ve tried several sources to install Caddy, including the Ubuntu-Repository and directly downloading the binaries from github. Also different configurations (as reverse_prox, file_server, tutorial-scripts) will not work correctly. Interesting is, that port 2019 will be bind to an ipv4 address only as it can be seen above.
6. Links to relevant resources:
Only relevant post, i`ve found so far: Caddy only serving on ipv6 - #2 by matt
Thanks in advance for your help!
EDIT: May 19th, 2020 - 22:44:
The solution was to bind the server to the specific IP of my webserver. Not just to the generic one 0.0.0.0.
Now the server serves the content as expected on IPv4 Port 80. Thanks for the suggestions and help!