Caddy v2.6.2 - "No input file specified."

1. Output of caddy version:

v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=

2. How I run Caddy:

a. System environment:

macOS Monterey
version 12.6

Caddy was installed using brew:

  • Homebrew 3.6.13-32-g93660d3
  • Homebrew/homebrew-core (git revision 4207c8f65b1; last commit 2022-12-03)
  • Homebrew/homebrew-cask (git revision ded31a6855; last commit 2022-12-03)

b. Command:

caddy run

c. Service/unit/compose file:

Not using "Docker/systemd/Kubernetes/make etc."

d. My complete Caddy config:

localhost:3000 {
    encode zstd gzip
    file_server
    php_fastcgi 127.0.0.1:9000

    header * {
        -server
    }
}

3. The problem I’m having:

I am serving a local project using a Caddyfile and the entry point is an index.php.

Yesterday (02/12/2022) when running caddy run the project was served correctly.

Today I have updated Caddy to the latest version (v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=) and when I run caddy run and try to load the page https://localhost:3000 I am getting the message “No input file specified.”

4. Error messages and/or full log output:

$ curl -v https://localhost:3000 > curl_result.txt
*   Trying 127.0.0.1:3000...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to localhost (127.0.0.1) port 3000 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [15 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [927 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [78 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [36 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [36 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: [NONE]
*  start date: Dec  3 07:52:52 2022 GMT
*  expire date: Dec  3 19:52:52 2022 GMT
*  subjectAltName: host "localhost" matched cert's "localhost"
*  issuer: CN=Caddy Local Authority - ECC Intermediate
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* h2h3 [:method: GET]
* h2h3 [:path: /]
* h2h3 [:scheme: https]
* h2h3 [:authority: localhost:3000]
* h2h3 [user-agent: curl/7.86.0]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x7f9743812400)
} [5 bytes data]
> GET / HTTP/2
> Host: localhost:3000
> user-agent: curl/7.86.0
> accept: */*
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [130 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 250)!
} [5 bytes data]
< HTTP/2 404
< alt-svc: h3=":3000"; ma=2592000
< content-type: text/html; charset=UTF-8
< status: 404 Not Found
< x-powered-by: PHP/8.1.11
< content-length: 25
< date: Sat, 03 Dec 2022 14:01:42 GMT
<
{ [5 bytes data]
100    25  100    25    0     0    843      0 --:--:-- --:--:-- --:--:--  1000
* Connection #0 to host localhost left intact

---

$ cat curl_result.txt
No input file specified.

5. What I already tried:

I am a Caddy newbie and I am testing to use Caddy for local development because to use the “https”.

The only topic I found was PHP : No input file specified but no solution.
I tried to search the documention but couldn’t find any solution or answer.

6. Links to relevant resources:

None.

Thank you

Hi,
my mistake because.

I also upgraded php using brew I needed to restart the php using brew services restart php.
Now it is working fine.

Thank you

2 Likes

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