Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caddy only returns 404 Not Found #3

Open
jandillmann opened this issue Nov 24, 2020 · 5 comments
Open

Caddy only returns 404 Not Found #3

jandillmann opened this issue Nov 24, 2020 · 5 comments

Comments

@jandillmann
Copy link

First of all, thank you for providing this helpful script!

However, I'm only getting a 404 error from Caddy:

* Trying 192.168.3.17...
* TCP_NODELAY set
* Connected to 192.168.3.17 (192.168.3.17) port 80 (#0)
> GET / HTTP/1.1
> Host: 192.168.3.17
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Server: Caddy
< Date: Tue, 24 Nov 2020 13:01:50 GMT
< Content-Length: 0
<
* Connection #0 to host 192.168.3.17 left intact
* Closing connection 0

Any ideas on how can I investigate further where the problem is? Opening the jail's URL in the browser only shows a white (blank) page.
I'm running FreeNAS 11.3-RELEASE-p14 and as far as I could see the installation went through without any errors.

@danb35
Copy link
Owner

danb35 commented Nov 24, 2020

From inside the jail, what's the output of caddy --version?

@jandillmann
Copy link
Author

root@heimdall:~ # caddy version
(devel)

root@heimdall:~ # caddy build-info
path: github.com/caddyserver/caddy/v2/cmd/caddy
main: github.com/caddyserver/caddy/v2 (devel)
dependencies:
 (devel)

It seems like it is not a release, but the development branch from Github?

@danb35
Copy link
Owner

danb35 commented Nov 25, 2020

Looks like the package maintainers have upgraded the caddy package to Caddy v2. Somewhat unfortunate given its lack of backward-compatibility--I'd thought they were going to use a new caddy2 package instead. If you look at the caddyv2 branch of this script, you can pull the updated Caddyfile from there.

@jandillmann
Copy link
Author

A little progress… Caddy now returns 200 OK, but still no heimdall page…

* Trying 192.168.3.17...
* TCP_NODELAY set
* Connected to 192.168.3.17 (192.168.3.17) port 80 (#0)
> GET / HTTP/1.1
> Host: 192.168.3.17
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Caddy
< Date: Wed, 25 Nov 2020 06:52:12 GMT
< Content-Length: 0
<
* Connection #0 to host 192.168.3.17 left intact
* Closing connection 0

Inside the jail, curl -v localhost:9000 only returns an empty response:

* Connected to localhost (127.0.0.1) port 9000 (#0)
> GET / HTTP/1.1
> Host: localhost:9000
> User-Agent: curl/7.72.0
> Accept: */*
>
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server

Maybe heimdall itself isn't running correctly?

@danb35
Copy link
Owner

danb35 commented Dec 29, 2020

Caddy v2 took a bit of a rewrite, but #4 should resolve this going forward. To test, on the first line of your Caddyfile, change *:80 to just :80.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants