Comments (12)
I got it to work. Ensure php-fpm has started.
My Caddyfile looks like this
127.0.0.1
root /path/to/php/dir
fastcgi / 127.0.0.1:9000 php {
ext .php
index index.php index.html
}
Hope this helps.
from caddy.
Thanks Abiola, this is not working with Caddy Win x86, it outputs this error:
http: multiple response.WriteHeader calls
from caddy.
That's interesting @devil1591. It means that more than one middleware thinks it has the floor. In other words, either:
- one middleware that actually writes the response isn't telling others properly (via return value, maybe?) that it wrote to the response, or
- a middleware that was told that somebody else wrote to the response still wrote to the response when it shouldn't have.
What kind of response was the client seeing? An error, or a page successfully served?
from caddy.
The error is No input file specified. 404 Not Found
from caddy.
Do you have Go installed? Could you change line 119 of fastcgi.go to:
return 0, nil
Because I suspect that php-fpm is giving 404 and writing "No input file specified" but the fastcgi handler is incorrectly returning the 404, signaling to Caddy that it needs to handle the error by writing "404 Not Found" - in this case, Caddy should not add anything to the response...
(If you don't have Go, just let me know, I can whip up a binary for you real quick.)
from caddy.
@devil1591 what is your middleware stack ? It could probably be a bug not limited to windows.
from caddy.
@mholt sorry, I don't have Go installed.
@abiosoft, I'm using php-cgi.exe (v5.4.40)
from caddy.
@devil1591 No problem. Here's a modified binary. I wouldn't expect it to fix the index file issue, but it should no longer say "multiple response.WriteHeader calls" - can you confirm that?
from caddy.
That's right, the error is now No input file specified.
and there is no error on the console anymore. The index issue is still there.
from caddy.
Awesome - 1 down, 1 to go.
@devil1591 Now I need some more details. Could you paste the contents of your Caddyfile? And also the URL exactly as it appears in your browser when that message appears? I need to make sure it ends with a forward slash /
character.
from caddy.
I confirm that Caddy 0.5.1 fixes the index file issue.
My URL was entered with a trailing slash.
Here is my caddy.conf:
192.168.10.66:80, 0.0.0.0:80
gzip
log logs/access.log
root apache2/htdocs
fastcgi / 127.0.0.1:9123 php {
ext .php
index index.php index.html
}
I used both 0.0.0.0 and 192.168.10.66 because 0.0.0.0 wasn't working.
from caddy.
@devil1591 glad to hear that. The are few new improvements to FastCGI middleware coming in the next release. Stay tuned.
from caddy.
Related Issues (20)
- Caddy is not stopping HOT 4
- Tailscale certificate is not found when email is specified HOT 3
- logs.skip_hosts is ignored HOT 12
- Placeholders do not work as upstream address for reverse_proxy HOT 2
- How can Caddy Server automatically switch over the next upstream server when it encounters an unhealthy HTTP status code during load balancing? HOT 1
- Getting real ip on docker HOT 2
- lb_retries apparently not working HOT 32
- Caddyfile support for On-Demand TLS permission modules HOT 1
- Add Caddyfile wiring for proxy `dynamic srv`'s `grace_period` option HOT 1
- Transparent proxy for IP HOT 1
- caddy stream state handling issues HOT 4
- Custom conditions for retrying proxy requests
- reverse_proxy: how to prevent stripping of headers with underscores / _ ? HOT 8
- Is fallback on a reverse_proxy's lb_policy being parsed properly? HOT 4
- Missing byte in first websocket message HOT 7
- `reverse_proxy` leads to duplicate `Server` headers HOT 6
- Unable to configure to Host: agnostic and port agnostic. HOT 2
- CADDY_ADMIN cannot be used to disable the admin interface HOT 1
- A placeholder cannot be used to disable the admin interface HOT 5
- CA/Browser Forum declared OCSP as optional HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy.