1. My Caddy version (caddy version
):
v2.0.0-rc.2 h1:7NOaxYrsnQ5D3rcLGn2UnLZHLfBpgrfM/JNTLhjCJ1c=
v1.0.4
2. How I run Caddy:
I run caddy on my dev machine using a batchfile because my caddyfile is named a bit differently (so windows just recognizes it as textfile)
a. System environment:
Windows 8.1 x64
b. Command:
caddy2.exe run --adapter caddyfile -config="caddy2conf.txt"
and
caddy.exe -conf="caddyconf.txt"
for caddy 1.
for PHP I use
PHP74\php-cgi.exe -b 127.0.0.1:9000
because I am still trying out caddy 2 I have it side by side with caddy 1 and a seperate config for that.
c. Service/unit/compose file:
I dont have any idea what this is about
d. My complete Caddyfile or JSON config:
paste config here, replacing this text
https://localhost {
encode gzip
root htdocs
php_fastcgi / 127.0.0.1:9000
file_server /* browse
tls ssl/my1-local-chain.crt ssl/My1-local-key.pem {
protocols tls1.2 tls1.3
}
}
http://localhost {
redir https://localhost{uri}
}
http://127.0.0.1, http://192.168.42.5 {
root htdocs
php_fastcgi / 127.0.0.1:9000
file_server /* browse
}
the caddy1 config file I used prior is this:
https://localhost {
gzip
root htdocs
fastcgi / 127.0.0.1:9000 php
browse /
tls ssl/my1-local-chain.crt ssl/My1-local-key.pem {
protocols tls1.2 tls1.3
}
markdown
}
http://localhost {
redir https://localhost{uri}
}
http://127.0.0.1, http://192.168.42.5 {
root htdocs
fastcgi / 127.0.0.1:9000 php
browse /
markdown
}
3. The problem I’m having:
while trying caddy 2 it seems that the PHP files I run don’t seem to work and I get a bunch of panic stuff no matter whether I run 7.3 or 7.4
and the browser just shows the text of the given php file instead of executing it
4. Error messages and/or full log output:
2020/04/13 17:40:56 http2: panic serving [::1]:61742: runtime error: invalid memory address or nil pointer dereference
goroutine 46 [running]:
net/http.(*http2serverConn).runHandler.func1(0xc00010c028, 0xc00086df8e, 0xc00006fe00)
net/http/h2_bundle.go:5713 +0x172
panic(0x146a1e0, 0x2487740)
runtime/panic.go:969 +0x174
github.com/caddyserver/caddy/v2/modules/caddyhttp.(*Server).ServeHTTP(0xc0008265a0, 0x1945360, 0xc00010c028, 0xc0000f6a00)
github.com/caddyserver/caddy/v2@v2.0.0-rc.2/modules/caddyhttp/server.go:203 +0x939
net/http.serverHandler.ServeHTTP(0xc0008fe0e0, 0x1945360, 0xc00010c028, 0xc000908200)
net/http/server.go:2807 +0xaa
net/http.initALPNRequest.ServeHTTP(0x194a420, 0xc00082bd10, 0xc000680380, 0xc0008fe0e0, 0x1945360, 0xc00010c028, 0xc000908200)
net/http/server.go:3381 +0x94
net/http.(*http2serverConn).runHandler(0xc00006fe00, 0xc00010c028, 0xc000908200, 0xc00080c000)
net/http/h2_bundle.go:5720 +0x92
created by net/http.(*http2serverConn).processHeaders
net/http/h2_bundle.go:5454 +0x4e8
2020/04/13 17:42:00 http2: panic serving [::1]:61742: runtime error: invalid memory address or nil pointer dereference
goroutine 100 [running]:
net/http.(*http2serverConn).runHandler.func1(0xc000006580, 0xc00078df8e, 0xc00006fe00)
net/http/h2_bundle.go:5713 +0x172
panic(0x146a1e0, 0x2487740)
runtime/panic.go:969 +0x174
github.com/caddyserver/caddy/v2/modules/caddyhttp.(*Server).ServeHTTP(0xc0008265a0, 0x1945360, 0xc000006580, 0xc0000f6e00)
github.com/caddyserver/caddy/v2@v2.0.0-rc.2/modules/caddyhttp/server.go:203 +0x939
net/http.serverHandler.ServeHTTP(0xc0008fe0e0, 0x1945360, 0xc000006580, 0xc000a24100)
net/http/server.go:2807 +0xaa
net/http.initALPNRequest.ServeHTTP(0x194a420, 0xc00082bd10, 0xc000680380, 0xc0008fe0e0, 0x1945360, 0xc000006580, 0xc000a24100)
net/http/server.go:3381 +0x94
net/http.(*http2serverConn).runHandler(0xc00006fe00, 0xc000006580, 0xc000a24100, 0xc000732000)
net/http/h2_bundle.go:5720 +0x92
created by net/http.(*http2serverConn).processHeaders
net/http/h2_bundle.go:5454 +0x4e8
5. What I already tried:
changing the PHP version
using stuff I didnt write myself and therefore should work like phpmyadmin