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)
- X-Accel-Redirect style of header matching is broken in handle_response
- using the file ext caddyfile for a config file does not work HOT 1
- Weighted Round-Robin strategy doesn't support zero values HOT 2
- regression in 2.8 file_server serving root index file HOT 3
- Any possibility/Hope for GUI like Nginx proxy manager ? HOT 2
- `Error: ambiguous config file format; please specify adapter (use --adapter)` since 2.8.2 HOT 10
- TLSv1.3 (IN), TLS alert, internal error (592) - When use TLS for IP address with Caddy HOT 6
- How to run 'crontab' ? HOT 6
- Error: ambiguous config file format, config inside hidden folder HOT 3
- Where do you perform time-taking one-time setups HOT 3
- `caddyevents.CaddyEvent` does not provide accessors to event metadata HOT 2
- After renaming basicauth to basic_auth directive Caddyfile fails to load if custom salt argument was used HOT 16
- Caddy does not save configs automatically HOT 6
- [file_server browse] Layout setting is not saved HOT 12
- vars not expanded in path directives HOT 6
- Global option acme_dns doesn't work with global option cert_issuer HOT 2
- proxy_protocol in the global settings does not work HOT 6
- file.* global replacements trailing newline interaction with secrets HOT 3
- Load balancer sticky cookie should have a Max-Age configuration HOT 4
- Add Placeholders for forward_proxy_url HOT 1
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.